Professional Documents
Culture Documents
BY
MOHAMMED BARGUMA
15/40563U/1
SUPERVISED BY:
JULY, 2021
Contents
CHAPTER ONE......................................................................................................................................................1
INTRODUCTION....................................................................................................................................................1
1.1. Background.......................................................................................................................................................1
CHAPTER TWO......................................................................................................................................................5
LITERATURE REVIEW.........................................................................................................................................5
2.1. Introduction.......................................................................................................................................................5
2.4.1. Melanoma...................................................................................................................................................9
2.5.4 Dermoscopy...............................................................................................................................................13
CHAPTER THREE................................................................................................................................................23
METHODOLOGY.................................................................................................................................................23
3.1. Introduction.....................................................................................................................................................23
3.4. Pre-processing.................................................................................................................................................24
References..............................................................................................................................................................27
iii
iv
CHAPTER ONE
INTRODUCTION
1.1. Background
The occurrence of malignant melanoma, which is the deadliest form of skin cancers, has been
elevated in the last decade. According to the latest statistics, 91270 new cases of melanoma is
predicted to be diagnosed in the United States in 2018. The rates of melanoma occurrence and
the mortality result of this disease, is expected to rise over the next decades (Koh et al., 2007).
Recent report shows that from 2008 to 2018, there has been a 53%increase in new melanoma
case diagnosis annually. If this type of cancer can be diagnosed in its early phases, with choosing
the appropriate treatment, survival rates are very promising. Otherwise, the predicted 5-year
survival rate of a patient will be reduced from 99% to 14%. Also in non-melanoma type of
cancer, there has been a drastic increase in the diagnosis of new cases up to 77% between 1994
and 2014. The basal cell carcinoma is the most common type of non-melanoma skin cancer
which results in the death of 3000 people each year (Amirreza et al., 2019).
So, this will cause a high demand for primary inspection and detection of different skin
cancer types in order to prevent it from getting worse and give a chance for better prognosis. The
usually way for a clinician to detect melanoma is by inspecting the visual details which has a low
precision. On the other hand, dermoscopy is a non-invasive technique that can capture a high
resolution image of the skin which enables dermatologists to detect features which are invisible
Skin cancer occurrence has become more common not only in the USA but also in different
countries with Caucasian people majority such as the UK and Canada with 10,000 diagnoses and
1
annual mortality of 1,250. Early diagnosis of the melanoma has been spotlighted due to the
persistent elevation of the number of incidents, the high medical cost, and increased death rate.
The developments in computer-aided diagnostic methods can have a vital role on significantly
reducing mortality. Skin cancer occurrence has become more common in the world where by
about Dermoscopy, which is one of the noninvasive skin imaging techniques, has become a key
method in the diagnosis of melanoma. Dermoscopy is the method that magnifies the region of
interest (ROI) optically and takes digital pictures of the ROI. Misdiagnosis or under diagnosis of
melanoma is the main reason for skin cancer-related fatalities. The cause of these errors is
usually due to the complexity of the subsurface structures and the subjectivity of visual
interpretations. Hence, there is a need for computerized image understanding tools to help
physicians or primary care assistants to minimize the diagnostic errors (M. Celebi et al., 2007).
Expert clinicians look for the presence of exclusive visual features to diagnose skin lesions
correctly in almost all of the clinical dermoscopy methods. These features are evaluated for
irregularities and malignancy (Esteva et al., 2017). However, in the case of an inexperienced
detection with dermoscopy still varies from 75-85%. This indicates the necessity of computer
The identification of cancer largely depends on digital biomedical photography analysis such as
non-trivial task, and decisions from investigation of these kinds of images always require
specialized knowledge. However, Computer Aided Diagnosis (CAD) techniques can help the
doctor make more reliable decisions. The state-of-the-art Deep Neural Network (DNN) has been
2
recently introduced for biomedical image analysis. Normally each image contains structural and
The aim of this research is to build a system that can classify melanoma cancer through the
images from the dermoscopy examination with AlexNet and ResNet models.
To develop a model for classification of skin cancer images using AlexNet and ResNet.
To evaluate and compare the performance of the proposed classification model in terms
This project work focuses on developing an AlexNet and ResNet models for image
classification. The model will be used for the detection of malignant and benign
The proposed model will focus mainly on image processing techniques and deep learning
algorithms.
The final model is expected to solve and increase accuracy in the classification model of the deep
learning models. Hence it helps in early classification of a skin cancer either being malign or
3
1.6. Organization of the project report
In the next chapter, information and previous work relevant for this thesis is presented (literature
review). The third chapter describes the methodology of this project. It contains information
about the datasets used and how the CNN was trained, validated and tested. The fourth chapter
presents the results gathered from the experiment. Chapter five presents the conclusion and
4
CHAPTER TWO
LITERATURE REVIEW
2.1. Introduction
various machine learning technologies. This chapter gives a brief introduction to skin and skin
cancer the current technologies used in detecting skin cancer (Recep, 2018).
Skin cancer is the most prevalent type of cancer. Melanoma, specifically, is responsible for
75% of skin cancer deaths, despite being the least common skin cancer. The American Cancer
Society estimates over 100,000 new melanoma cases will be diagnosed in 2020. It's also
expected that almost 7,000 people will die from the disease. As with other cancers, early and
accurate detection potentially aided by data science can make treatment more effective (David,
2019).
Cancer is one of the leading causes of death of human beings. According to the World Health
Organization statistics, it is predicted that cancer will be the biggest cause of death (13.1 million)
by 2030. Among all cancer types, skin cancer is the most common form of cancer in the USA.
Based on the predictions, 20% of Americans will develop skin cancer during their lifetime
(Recep, 2018).
Machine Learning (ML) is an area that aims to construct new algorithms to make predictions
based on given data. Machine Learning generates general models using training data so that
these models can detect the presence or the absence of a pattern in test (new) data. In the case of
images like in this thesis, training data can be in the form of images, regions, or pixels which are
labeled or not. Patterns can be a low-level or a high-level. For instance, a low-level pattern can
5
be a label for pixels in segmentation while high-level pattern can be the presence or the absence
of a disease in a medical image. In this case, the image classification becomes the addressed
problem with a training set containing image-label pairs (C. Bishop, 2006).
The human body is made of living cells which grow, divide into new cells, and die. Cell
division is a continuous process in the human body and is a replacement of dying cells. However,
growing of abnormal cells and uncontrollable cell division are the causes of cancer (Cancer Facts
Skin cancer is one of the most common cancers in human beings, and it arises from the skin
due to the abnormal growth of the cells that can easily invade and spread to the other parts of the
human body (What Is Cancer?" June 2014.). There are three main categories of skin cancers:
Malignant melanoma
The BCC and SCC are types of non-melanoma skin cancers (NMSC).
Dermoscopy, a minimal invasive skin imaging technique, is one of the viable methods for
detecting melanoma and other pigmented skin proliferations. In the current clinical settings, the
first step of dermoscopic evaluation is to decide whether the lesion is melanocytic or not. The
6
2.4.1. Melanoma
Melanoma is the most common cause of skin cancer related deaths worldwide (Eiko Saito et
al., 2017). In the United States alone, it is estimated that there will be 100,350 cases and 6,850
Melanoma is one of the deadliest and fastest growing cancer types in the world. In the
Nigeria annually 3.5 million skin cancers are diagnosed (Nigeria Cancer Society). Skin cancer is
rarely fatal except melanoma which is the 6th common cancer type in the Nigeria (Nigeria
Cancer Association). Women 25–29 years of age are the most commonly affected group from
melanoma. Ultraviolet tanning devices are listed as known and probable human carcinogens
along with plutonium and cigarettes by the World Health Organization. In 2017, an estimated
87,110 adults were diagnosed with melanoma in Nigeria, and approximately 9,730 were fatal
(WHO). The primary cause of melanoma is DNA damage due to the UV light exposure (i.e., sun
light and tanning beds). Genetics with history of malignant melanoma and having a fair skin type
located in its outer epidermis. Since melanoma develops in the epidermis, it can be seen by the
human eye. Early diagnosis and treatment are critical to prevent harm. When caught early,
melanoma can be cured through excision operation. However, the high rate of false-negative of
malignant melanoma is the main challenge for early treatments (F. M. Walter et al., 2013).
Melanoma is commonly found on the lower limbs in female patients and on the back in
male patients (World Cancer Report), but it can also be found on other organs containing cells
such as the mouth and eye which is very rare (“Melanoma Treatment for Health Professionals,”).
7
2.4.2. Basal-Cell Carcinoma
The basal-cell carcinoma (BCC) is the most common form of skin cancer with at least 4
million cases in the U.S. annually. It arises from the deepest layer of the epidermis. BCCs
usually look like red patches or open sores (see Figure 2). There are very rare cases of spreading
of BCCs as they almost never spread (Basal Cell Carcinoma (BCC)), but people who have had
Figure 2: A red patch (a) and open sore (b) types of basal-cell carcinoma (Basal Cell Carcinoma
Squamous-cell carcinoma (SCC) usually begins as a small lump, expands over time, and turns
into an ulcer. Compared to BCCs, SCCs have more irregular shapes with crusted surface (Figure
3), and they are more likely to spread to the other organs (B. Cakir et al., 2012).
8
Figure 3: An elevated growth (a) and irregular borders (b) of squamous-cell carcinoma
(Squamous Cell Carcinoma (SCC)) (Figures are reprinted with permission of Skin Cancer
Foundation).)
use various machine learning technologies. Here we give a brief introduction to these
Machine learning is a technique to teach programs that use data, to generate algorithms
that originates from the research into artificial intelligence. It is closely associated to statistics
and mathematical optimization, which give methods, theories, and application domains to the
field. Machine learning is used in various computing tasks where programming explicitly rule-
based algorithms is infeasible. Example applications include; e-mail spam filters, search engines,
language translation, and computer visions (Samir, “mastering python for data science”, 2015)
Machine learning algorithms can be classified into three key categories based on the
Supervised Learning: A supervised learning algorithm studies the training data and
generates a function, which can be used for predicting new instances (Samir, “mastering
9
Unsupervised Learning: unsupervised learning tries to find hidden structures in
unlabeled data. As you can see in the following diagram, there is no label that is inputted
and uses a large amount of unlabeled data for training along with the small amount
mass of algorithms. Most modern deep learning models are based on a NN, so there is a cascade
of multiple layers in deep learning similar to NNs. Deep learning can extract useful features
directly from images, text and sound in supervised and/or unsupervised manners which makes it
different than standard machine learning techniques. In fact, feature extraction with this approach
is considered as a part of the learning process. With these characteristics of deep learning, there
In the context of computer vision, the most commonly applied artificial neural network is a
convolutional neural network (CNN). There are two main reasons why CNNs are used in
computer vision problems. Firstly, with traditional NNs, solving the computer vision problem for
even relatively small sized images is challenging. For example, a monochrome 750x563 image
contains 422,250 pixels. If this image is polychrome, the number of pixels is typically multiplied
by three which is the typical amount of color channels, and in this case, the image would have
1,266,750 pixels and the same number of weights. Consequently, the overall number of free
10
parameters in NN quickly becomes extremely large which causes overfitting and reduces the
other image classification algorithms, which means CNNs can learn the filters by itself (M.
Thoma, 2017).
The CNN consists of input and output layers as well as the multiple hidden layers. The
hidden layers are usually made of convolutional layers, pooling layers, and fully connected
§ Convolutional Layers: These layers pass the results of the input to the next layer. It
§ Pooling Layers: These layers combine the outputs of neuron clusters at one layer into a
single neuron in the next layer. The purpose of this layer is to reduce the parameters and
computation in network.
§ Fully-connected Layers: These layers connect each and every neuron in one layer to
11
2.5.4. Related Work
There are commonly accepted protocols to detect malignancy in skin lesions, which are
ABCD Rule, 7-point Checklist, Pattern Analysis, Menzies Method, Revised Pattern Analysis, 3-
point Checklist, 4-point Checklist, and CASH Algorithm (N. di Meo et al., 2016).
Celebi et al. extracted shape, color, and texture features and fed these feature vectors to a
classifier such that they were ranked using feature selection algorithms to determine the optimal
subset size. Their approach yielded a specificity of 92.34% and a sensitivity of 93.33% using 564
images. In their seminal work, Dreiseitl et al. analyzed the robustness of artificial neural
networks (ANN), logistic regression, k-nearest neighbors, decision trees, and support vector
machines (SVMs) on classifying common nevi, dysplastic nevi, and melanoma. They addressed
three classification problems: dichotomous problem of separating common nevi from melanoma
and dysplastic nevi, and the trichotomous problem of genuinely separating all these classes. They
reported that on both cases (dichotomous and trichotomous) logistic regression, ANNs and
SVMs showed the same performance, whereas k-nearest neighbor and decision trees performed
worse.
Iyatomi et al. proposed an internet based system which employs a feature vector consisting of
shape, texture, and color features. They achieved specificity and sensitivity of 86% using 1200
dermoscopy images. Local methods have also been recently applied for skin lesion classification.
Situ et al. offered a patch-based algorithm which used a Bag-of-Features approach. They
sampled the region of lesion into a 16 × 16 grid and extracted Wavelets and Gabor filters as
collecting 23 features in total. They compared two different classifiers which were Naïve Bayes
and SVM; the best performance they achieved was 82% specificity on a dataset consisting of 100
12
A considerable number of systems have been proposed for melanoma detection in the last
decade. Some of them aim to mimic the procedure that dermatologists pursue for detecting and
extracting dermoscopic features, such as granularities (W. V. Stoecker et al.,2005), and blue-
white veils (M. Celebi et al., 2008). These structures are also used by dermatologists to score the
lesion based on a seven point-checklist. Leo et al. described a CAD system that mimics the 7-
point-checklist procedure.
melanoma detection. The majority of these works are inspired by the ABCD rule (10), and they
extract the features according to the score table of ABCD protocol. Shape features (e.g.,
irregularity, aspect ratio and maximum diameter, compactness), which refer to both asymmetry
and border, color features in several color channels, and texture features (e.g., gray level co-
occurrence matrix) are the most common features analyzed when the ABCD protocol is used (F.
There are other approaches that used one type of feature for detection of melanoma.
Seidenari et al. aimed to distinguish atypical nevi and benign nevi using color statistics in the
RGB channel, such as mean, variance, and maximum RGB distance. Their approach reached
86% accuracy, additionally they concluded that there was a remarkable difference in distribution
of pigments between the populations they studied. Color histograms have been utilized for
discriminating melanomas and atypical or benign nevi (R. Stanley et al., 2007) with specificity
13
S/ Author/Year Tittle of the Method/Technique Findings Limitations
N paper used (Result)
1 Pomponiu, V., Deep neural Deep Neural 93.64%
Nejati, H., & networks for Network
Cheung, N. M., skin mole
2016 lesion
classification
2 Codella, N. C., Skin lesion N/A 93.1%
Gutman, D., analysis
Celebi, M. E., toward
Helba, B., melanoma
Marchetti, M. detection
A., Dusza, S.
W. & Halpern,
A., 2018
3 Haenssle, H. Diagnostic Convolution 86%
A., Fink, C., performance of Neural Network
Schneiderbauer, a deep learning
R., Toberer, F., convolutional
Buhl, T., Blum, neural network
A.&Uhlmann, for
L., 2018 dermoscopic
melanoma
recognition in
comparison to
58
dermatologists.
Annals of
Oncology
4 Han, S. S., Classification Deep Learning 83%
Kim, M. S., of the clinical
Lim, W., Park, images for
G. H., Park, I., benign and
& Chang, S. E., malignant
2018 cutaneous
tumors using a
deep learning
algorithm.
5 Bi, L., Kim, J., Automatic skin Deep Residual 91.5%
Ahn, E., & lesion analysis Networks
Feng, D., 2017. using large-
14
scale
dermoscopy
images and
deep residual
networks
6 Lopez, A. R., Skin lesion Deep Learning 81.33%
Giro-i-Nieto, classification
X., Burdick, J., from
& Marques, O., dermoscopic
2017 images using
deep learning
techniques
7 Kawahara, J., & Multi- Convolution 79.5%
Hamarneh, G., resolution-tract Neural Networks
2016 CNN with
hybrid
pretrained and
skin-lesion
trained layers
8 Nasr-Esfahani, Melanoma Convolution 81%
E.,amavi, S., detection by Neural Networks
Karimi, N., analysis of
Soroushmehr, clinical images
S. M. R., Jafari, using
M. H., Ward, convolutional
K., & Najarian, neural
K., 2016 networks
9 Amirreza Dermatologist Deep Learning 94.40%
Rezvantalab, Level Convolutional
Habib Dermoscopy Neural Networks
Safigholi, Skin Cancer
Somayeh Classification
Karimijeshni, Using
2018 Different Deep
Learning
Convolutional
Neural
Networks
Algorithms
15
Dr.Sureshkum recognition Network
Nagarajan,2017 using Deep
Residual
Network
11 Gouda N, et al., Skin Cancer Deep Residual 92%
2020 Classification Network
Using ResNet.
16
CHAPTER THREE
METHODOLOGY
3.1. Introduction
Nowadays, CNN (Convolutional Neural Networks) have worked well in the field of object
detection, image classification (Krizhevsky et al., 2012). Deep learning has many branches. It
has an extensive branch of convolutional neural nets and recurrent neural networks like LSTM.
These neural networks can learn from the training data and help in classifying the images into
different categories. The neural networks learn from the data from their layers, they have their
own layers of max-pooling, activation units, convolution layers and fully connected layers
Almost same steps are involved in every computer aided skin disease diagnostic system and
Data
Data Testing,
Collection and Training Data
Pre-Processing Augumentatio Classification
Data Process
n and Result
Acquisition
This work reviews the noise removal techniques as well as different segmentation, feature
extraction and classification techniques. The following sections sequentially discuss about the
17
different pre-processing, data augmentation, data collection and acquisition. Dataset,
computational time, accuracy was considered while evaluating the work done by researchers.
The dataset is obtained from data.mendely.com website, contains 8094 images of skin cancer.
These 8094 images consist of 1513 melanoma cancer images and 6581 non-melanoma cancer
images
The aim of data acquisition is to determine which objects will be used as research objects.
The object of research is in the form of two-dimensional images in JPG format which contain
3.4. Pre-processing
The dataset contains of different image resolution which require high cost of computation. It
is necessary to rescale all the images to 567 x 375 pixels for this deep learning network.
The main step towards a complete analysis of pigmented skin lesion is to remove the noise.
In computer aided skin lesion diagnosis research it has been observed that the dermoscopy
18
images contain some artefacts such as black frame, dermoscopic gel, air bubbles and some
cutaneous features that can affect the lesion classification such as hairs, skin lines and blood
vessels. These artefacts create a barrier in border detection and results in accuracy loss and
increased computational cost. Therefore, some pre-processing steps are required to remove these
Another undesirable artefact that are commonly present in dermoscopic image is hairs as
shown in Fig 8.
Fig. 8. Skin hairs affect skin lesion classification (H. Pehamberger et al., 1987)
Data augmentation is used to multiply the variation of images from the dataset by rotating
the image, increasing or decreasing the image’s length and width, zooming in the image, and also
flipping the image horizontally. The example of this data augmentation can be seen in Fig. 9.
19
Fig. 9. Data Augmentation of Melanoma Cancer Image.
The training process starts by reading the model name and number of epoch and batch size
received from the user. Then the system reads the dataset with melanoma and non-melanoma
categories. Then all the images from the dataset are resized into 224x224 pixel and the dataset
augmentation will be generated. The system initializes CNN architectures and starts to train the
network as much the number of epoch inputted by the user earlier. The training will produce a
probability value for the two classification classes, where the class with the greatest probability
value is the classification class predicted by the program. The training results are then stored in
the form of a model file. After completing the training, the system will save the model and plot
In this training there are parameters that are run constantly throughout the procedure, namely
learning rate and batch size. The learning rate used is 0.001, where this parameter states the
constants for learning speed from the network layer used. While the batch size parameter serves
to determine the total amount of data used in one batch of training. In this paper, the batch size
20
used is 32. Determination of batch size is considered from the memory capability of the device
output and the actual output. This is also called as a Cost function(C) or Loss function. As our
goal is to minimize the cost function by finding the optimized value for weights. Gradient
descent is an iterative machine learning optimization algorithm to reduce the cost function. This
will help models to make accurate predictions. Here we use stochastic gradient descent. In
stochastic gradient descent we use a single data point or example to calculate the gradient and
update the weights with every iteration. We have used binary cross entropy loss function (BCE).
BCE loss is used for the binary classification tasks. BCE Loss creates a criterion that measures
the Binary Cross Entropy between the target and the output. If we use BCE Loss function, we
The method outlined in this section is Deep Learning models i.e. the AlexNet and ResNet which
In Deep Learning, a Convolutional Neural Network (CNN) is a class of deep neural networks,
most commonly applied to analyzing visual imagery. Convolutional Neural Networks are state of
the art models for Image Classification, Segmentation, Object Detection and many other image
processing tasks. AlexNet is an incredibly powerful model capable of achieving high accuracies
21
on very challenging datasets. However, removing any of the convolutional layers will drastically
degrade AlexNet’s performance. Figure 10 illustrates the overall Alexnet architecture. With 22M
parameters, AlexNet has 8 layers - 5 convolutional and 3 fully connected (Mohamed A. Kassem,
, 2019).
First layer is convolution layer, input image size is 224x224x3, has 64 filters and 11x11 filter
size and we reduce the maxpolling to 3x3 polling size. RELU layer applying an activation
function such as the max (0, x) function, to product elementwise non-linearity. Any negative
input given to the ReLU activation function turns the value into zero immediately. The following
by the pooling layer. The pooling layer tries to reduce the dimensionality of each feature map
while keeping important features, where pooling may be Sum, Max, Average, etc. AlexNet uses
a max pooling layer. Second convolution layer has filter of size 5x5, followed by max pooling
layer. The output of this layer is passed through three consecutive convolution layers, followed
by max pooling layer. The output of these three convolutional layers are passed as input to
number of 2 fully connected layers where each layer contains 4096 neurons. Last layer consists
of sigmoid function. Sigmoid function is usually used in output layer of a binary classification,
where result is either 0 or 1, as value for sigmoid function lies between 0 and 1 only so, result
22
Figure 10: AlexNet architecture (Shikha Rai A et al., 2020)
To get the insight of internal states and statistics of the model during the training. The following
Figure 11: Methodology of Training the Model (Shikha Rai A et al., 2020)
After the model is trained over the train data it has to be tested. This is done according to the
Figure 12: Methodology of Testing the Model (Shikha Rai A et al., 2020)
23
3.8.2. ResNet Architecture
Deep Residual Network (ResNet) is an Artificial Neural Network (ANN) that is made with the
point of beating the issue of lower exactness while making a plain ANN with a more profound
layer than a shallower ANN (O’Shea K et al., 2015). The motivation behind the Deep Residual
Network is to make ANN with more profound layers with high exactness (He K, et al., 2016).
The idea of the Deep Residual Network is to make ANN that can refresh the weight to a
shallower layer (lessen debasement slope) shown in Figure 13. The idea is implemented utilizing
an "alternate route association". In our experiment, we used ResNet because ResNet makes it
possible to train up to 1000 layers and still gives a good performance. The main idea of using
ResNet is it helps in giving an identical shortcut connection so that few layers can be skipped for
faster training purposes. Also, in our experiment we are using 3x3 convolution layers, 6 max
pooling layers and 22mbatch normalization layers shown in Figure 13 and utilizing 77 epochs to
abbreviate the model preparing time. The individual layers which helps in characterizing the
24
pictures gives output to the fully connected layers which helps in further classification of the
images. It flattens the layers and gives the output to the next layers.
Convolutional layers
A filter ignores the picture, examining a couple of pixels one after another and making a
component map that predicts the class to which each element has a place.
Max-pooling layers
It diminishes the measure of data in each element acquired in the convolutional layer while
keeping up the most significant data (there are normally a few rounds of convolution and
pooling).
Dropouts
the dropout closes off various arbitrary neurons at the predefined layer and doesn't utilize the
The steps followed in the classification using ResNet is shown in figure 15 below.
Figure 15: steps followed in classification using ResNet (Amudha J et al., 2020)
25
CHAPTER FOUR
DISCUSSION OF RESULT
The CNN model for Melanoma skin cancer detection was done using AlexNet architecture
which is mentioned above. The model is simulated using online kaggle notebook which is an
integrated online development environment used in computer programming, specifically for the
Python language. The main packages used for project interpreter Python 3.8 are Keras 2.3.1
of TensorFlow 2.1.0 which is a free and open-source software library for dataflow and
differentiable programming across a range of tasks. Model contains all the layers of AlexNet
architecture including their Output shapes with filters used and the parameters of that layer. The
parameters like biases and weights are Total params: 22,112,074, Trainable params: 22,094,406
First layer is convolution layer, input image size is 224x224x3, has 64 filters and 11x11 filter
size and we reduce the maxpolling to 3x3 polling size. RELU layer applying an activation
function such as the max (0, x) function, to product elementwise non-linearity which two
neurons at the last layer. Any negative input given to the ReLU activation function turns the
26
value into zero immediately. The model is trained using this architecture over a train data of
2637 skin lesion images. It is validated using 660 skin lesion images which gave a maximum
validation accuracy of 86% after checking for 77 epochs and steps_per_epoch is 30 and. The
Optimizer used is Adam descent with learning rate of 0.001 and loss function used is
27
batch_normalization_4 (Batch (None, 4096) 16384
_________________________________________________________________
activation_4 (Activation) (None, 4096) 0
_________________________________________________________________
dense_1 (Dense) (None, 4096) 16781312
_________________________________________________________________
batch_normalization_5 (Batch (None, 4096) 16384
_________________________________________________________________
activation_5 (Activation) (None, 4096) 0
_________________________________________________________________
dense_2 (Dense) (None, 2) 8194
_________________________________________________________________
batch_normalization_6 (Batch (None, 2) 8
_________________________________________________________________
activation_6 (Activation) (None, 2) 0
Results show good accuracy of the model using AlexNet architecture. Accuracy of almost 85%
is achieved. Approval exactness shows that much information is anticipated accurately by the
model contrasted with all the data. The graph of accuracy and loss against respective epochs are
28
Figure 17: Graph of model loss obtained from AlexNet architecture
The classification report for the AlexNet experiment is displayed below. Notice that we
precision, fi-score and recall accuracy of 90%, 82% and 86% respectively of benign and 85%,
The CNN model for Melanoma skin cancer detection was done using ResNet architecture which
is mentioned above. The model is simulated using online kaggle notebook which is an integrated
online development environment used in computer programming, specifically for the Python
language. The main packages used for project interpreter Python 3.8 are Keras 2.3.1 which is an
TensorFlow 2.1.0 which is a free and open-source software library for dataflow and
29
differentiable programming across a range of tasks. Model contains all the layers of ResNet
architecture including their Output shapes with filters used and the parameters of that layer. The
parameters like biases and weights are Total params: 26,735,730, Trainable params: 26,688,514
First layer is convolution layer, input image size is 224x224x3, has 64 filters and 3x3 filter size
and we reduce the maxpolling to 2x2 polling size. RELU layer applying an activation function
such as the max (0, x) function, to product elementwise non-linearity which two neurons at the
last layer and a dropout of 0.5 to avoid overfitting. Any negative input given to the ReLU
activation function turns the value into zero immediately. The model is trained using this
architecture over a train data of 2637 skin lesion images. It is validated using 660 skin lesion
images which gave a maximum validation accuracy of 90% after checking for 82 epochs and
keras.preprocessing package. Optimizer used is Adam descent with learning rate of 0.001 and
30
pool1_pad (ZeroPadding2D) (None, 114, 114, 64) 0
conv1_relu[0][0]
__________________________________________________________________________
pool1_pool (MaxPooling2D) (None, 56, 56, 64) 0
pool1_pad[0][0]
__________________________________________________________________________
conv2_block1_1_conv (Conv2D) (None, 56, 56, 64) 4160
pool1_pool[0][0]
__________________________________________________________________________
conv2_block1_1_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block1_1_conv[0][0]
__________________________________________________________________________
________________________
conv2_block1_1_relu (Activation (None, 56, 56, 64) 0
conv2_block1_1_bn[0][0]
__________________________________________________________________________
conv2_block1_2_conv (Conv2D) (None, 56, 56, 64) 36928
conv2_block1_1_relu[0][0]
__________________________________________________________________________
conv2_block1_2_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block1_2_conv[0][0]
__________________________________________________________________________
conv2_block1_2_relu (Activation (None, 56, 56, 64) 0
conv2_block1_2_bn[0][0]
__________________________________________________________________________
conv2_block1_0_conv (Conv2D) (None, 56, 56, 256) 16640
pool1_pool[0][0]
__________________________________________________________________________
________________________
conv2_block1_3_conv (Conv2D) (None, 56, 56, 256) 16640
conv2_block1_2_relu[0][0]
__________________________________________________________________________
conv2_block1_0_bn (BatchNormali (None, 56, 56, 256) 1024
conv2_block1_0_conv[0][0]
__________________________________________________________________________
________________________
conv2_block1_3_bn (BatchNormali (None, 56, 56, 256) 1024
conv2_block1_3_conv[0][0]
__________________________________________________________________________
conv2_block1_add (Add) (None, 56, 56, 256) 0
conv2_block1_0_bn[0][0]
conv2_block1_3_bn[0][0]
__________________________________________________________________________
conv2_block1_out (Activation) (None, 56, 56, 256) 0
conv2_block1_add[0][0]
__________________________________________________________________________
conv2_block2_1_conv (Conv2D) (None, 56, 56, 64) 16448
conv2_block1_out[0][0]
__________________________________________________________________________
conv2_block2_1_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block2_1_conv[0][0]
31
__________________________________________________________________________
conv2_block2_1_relu (Activation (None, 56, 56, 64) 0
conv2_block2_1_bn[0][0]
__________________________________________________________________________
conv2_block2_2_conv (Conv2D) (None, 56, 56, 64) 36928
conv2_block2_1_relu[0][0]
__________________________________________________________________________
conv2_block2_2_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block2_2_conv[0][0]
__________________________________________________________________________
conv2_block2_2_relu (Activation (None, 56, 56, 64) 0
conv2_block2_2_bn[0][0]
__________________________________________________________________________
conv2_block2_3_conv (Conv2D) (None, 56, 56, 256) 16640
conv2_block2_2_relu[0][0]
__________________________________________________________________________
conv2_block2_3_bn (BatchNormali (None, 56, 56, 256) 1024
conv2_block2_3_conv[0][0]
__________________________________________________________________________
conv2_block2_add (Add) (None, 56, 56, 256) 0
conv2_block1_out[0][0]
conv2_block2_3_bn[0][0]
__________________________________________________________________________
conv2_block2_out (Activation) (None, 56, 56, 256) 0
conv2_block2_add[0][0]
__________________________________________________________________________
conv2_block3_1_conv (Conv2D) (None, 56, 56, 64) 16448
conv2_block2_out[0][0]
__________________________________________________________________________
conv2_block3_1_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block3_1_conv[0][0]
__________________________________________________________________________
conv2_block3_1_relu (Activation (None, 56, 56, 64) 0
conv2_block3_1_bn[0][0]
__________________________________________________________________________
conv2_block3_2_conv (Conv2D) (None, 56, 56, 64) 36928
conv2_block3_1_relu[0][0]
__________________________________________________________________________
conv2_block3_2_bn (BatchNormali (None, 56, 56, 64) 256
conv2_block3_2_conv[0][0]
__________________________________________________________________________
conv2_block3_2_relu (Activation (None, 56, 56, 64) 0
conv2_block3_2_bn[0][0]
__________________________________________________________________________
conv2_block3_3_conv (Conv2D) (None, 56, 56, 256) 16640
conv2_block3_2_relu[0][0]
__________________________________________________________________________
conv2_block3_3_bn (BatchNormali (None, 56, 56, 256) 1024
conv2_block3_3_conv[0][0]
__________________________________________________________________________
conv2_block3_add (Add) (None, 56, 56, 256) 0
conv2_block2_out[0][0]
32
conv2_block3_3_bn[0][0]
__________________________________________________________________________
conv2_block3_out (Activation) (None, 56, 56, 256) 0
conv2_block3_add[0][0]
__________________________________________________________________________
conv3_block1_1_conv (Conv2D) (None, 28, 28, 128) 32896
conv2_block3_out[0][0]
__________________________________________________________________________
conv3_block1_1_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block1_1_conv[0][0]
__________________________________________________________________________
conv3_block1_1_relu (Activation (None, 28, 28, 128) 0
conv3_block1_1_bn[0][0]
__________________________________________________________________________
conv3_block1_2_conv (Conv2D) (None, 28, 28, 128) 147584
conv3_block1_1_relu[0][0]
__________________________________________________________________________
conv3_block1_2_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block1_2_conv[0][0]
__________________________________________________________________________
conv3_block1_2_relu (Activation (None, 28, 28, 128) 0
conv3_block1_2_bn[0][0]
__________________________________________________________________________
________________________
conv3_block1_0_conv (Conv2D) (None, 28, 28, 512) 131584
conv2_block3_out[0][0]
__________________________________________________________________________
conv3_block1_3_conv (Conv2D) (None, 28, 28, 512) 66048
conv3_block1_2_relu[0][0]
__________________________________________________________________________
conv3_block1_0_bn (BatchNormali (None, 28, 28, 512) 2048
conv3_block1_0_conv[0][0]
__________________________________________________________________________
conv3_block1_3_bn (BatchNormali (None, 28, 28, 512) 2048
conv3_block1_3_conv[0][0]
__________________________________________________________________________
conv3_block1_add (Add) (None, 28, 28, 512) 0
conv3_block1_0_bn[0][0]
conv3_block1_3_bn[0][0]
__________________________________________________________________________
conv3_block1_out (Activation) (None, 28, 28, 512) 0
conv3_block1_add[0][0]
__________________________________________________________________________
conv3_block2_1_conv (Conv2D) (None, 28, 28, 128) 65664
conv3_block1_out[0][0]
__________________________________________________________________________
conv3_block2_1_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block2_1_conv[0][0]
__________________________________________________________________________
conv3_block2_1_relu (Activation (None, 28, 28, 128) 0
conv3_block2_1_bn[0][0]
__________________________________________________________________________
33
conv3_block2_2_conv (Conv2D) (None, 28, 28, 128) 147584
conv3_block2_1_relu[0][0]
__________________________________________________________________________
conv3_block2_2_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block2_2_conv[0][0]
__________________________________________________________________________
conv3_block2_2_relu (Activation (None, 28, 28, 128) 0
conv3_block2_2_bn[0][0]
__________________________________________________________________________
conv3_block2_3_conv (Conv2D) (None, 28, 28, 512) 66048
conv3_block2_2_relu[0][0]
__________________________________________________________________________
conv3_block2_3_bn (BatchNormali (None, 28, 28, 512) 2048
conv3_block2_3_conv[0][0]
__________________________________________________________________________
conv3_block2_add (Add) (None, 28, 28, 512) 0
conv3_block1_out[0][0]
conv3_block2_3_bn[0][0]
__________________________________________________________________________
conv3_block2_out (Activation) (None, 28, 28, 512) 0
conv3_block2_add[0][0]
__________________________________________________________________________
conv3_block3_1_conv (Conv2D) (None, 28, 28, 128) 65664
conv3_block2_out[0][0]
__________________________________________________________________________
conv3_block3_1_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block3_1_conv[0][0]
__________________________________________________________________________
conv3_block3_1_relu (Activation (None, 28, 28, 128) 0
conv3_block3_1_bn[0][0]
__________________________________________________________________________
conv3_block3_2_conv (Conv2D) (None, 28, 28, 128) 147584
conv3_block3_1_relu[0][0]
__________________________________________________________________________
conv3_block3_2_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block3_2_conv[0][0]
__________________________________________________________________________
conv3_block3_2_relu (Activation (None, 28, 28, 128) 0
conv3_block3_2_bn[0][0]
__________________________________________________________________________
conv3_block3_3_conv (Conv2D) (None, 28, 28, 512) 66048
conv3_block3_2_relu[0][0]
__________________________________________________________________________
conv3_block3_3_bn (BatchNormali (None, 28, 28, 512) 2048
conv3_block3_3_conv[0][0]
__________________________________________________________________________
conv3_block3_add (Add) (None, 28, 28, 512) 0
conv3_block2_out[0][0]
conv3_block3_3_bn[0][0]
__________________________________________________________________________
conv3_block3_out (Activation) (None, 28, 28, 512) 0
conv3_block3_add[0][0]
34
__________________________________________________________________________
conv3_block4_1_conv (Conv2D) (None, 28, 28, 128) 65664
conv3_block3_out[0][0]
__________________________________________________________________________
conv3_block4_1_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block4_1_conv[0][0]
__________________________________________________________________________
conv3_block4_1_relu (Activation (None, 28, 28, 128) 0
conv3_block4_1_bn[0][0]
__________________________________________________________________________
conv3_block4_2_conv (Conv2D) (None, 28, 28, 128) 147584
conv3_block4_1_relu[0][0]
__________________________________________________________________________
conv3_block4_2_bn (BatchNormali (None, 28, 28, 128) 512
conv3_block4_2_conv[0][0]
__________________________________________________________________________
conv3_block4_2_relu (Activation (None, 28, 28, 128) 0
conv3_block4_2_bn[0][0]
__________________________________________________________________________
conv3_block4_3_conv (Conv2D) (None, 28, 28, 512) 66048
conv3_block4_2_relu[0][0]
__________________________________________________________________________
conv3_block4_3_bn (BatchNormali (None, 28, 28, 512) 2048
conv3_block4_3_conv[0][0]
__________________________________________________________________________
conv3_block4_add (Add) (None, 28, 28, 512) 0
conv3_block3_out[0][0]
conv3_block4_3_bn[0][0]
__________________________________________________________________________
conv3_block4_out (Activation) (None, 28, 28, 512) 0
conv3_block4_add[0][0]
__________________________________________________________________________
conv4_block1_1_conv (Conv2D) (None, 14, 14, 256) 131328
conv3_block4_out[0][0]
__________________________________________________________________________
conv4_block1_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block1_1_conv[0][0]
__________________________________________________________________________
conv4_block1_1_relu (Activation (None, 14, 14, 256) 0
conv4_block1_1_bn[0][0]
__________________________________________________________________________
conv4_block1_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block1_1_relu[0][0]
__________________________________________________________________________
conv4_block1_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block1_2_conv[0][0]
__________________________________________________________________________
conv4_block1_2_relu (Activation (None, 14, 14, 256) 0
conv4_block1_2_bn[0][0]
__________________________________________________________________________
conv4_block1_0_conv (Conv2D) (None, 14, 14, 1024) 525312
conv3_block4_out[0][0]
__________________________________________________________________________
35
conv4_block1_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block1_2_relu[0][0]
__________________________________________________________________________
conv4_block1_0_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block1_0_conv[0][0]
__________________________________________________________________________
conv4_block1_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block1_3_conv[0][0]
__________________________________________________________________________
conv4_block1_add (Add) (None, 14, 14, 1024) 0
conv4_block1_0_bn[0][0]
conv4_block1_3_bn[0][0]
__________________________________________________________________________
conv4_block1_out (Activation) (None, 14, 14, 1024) 0
conv4_block1_add[0][0]
__________________________________________________________________________
conv4_block2_1_conv (Conv2D) (None, 14, 14, 256) 262400
conv4_block1_out[0][0]
__________________________________________________________________________
conv4_block2_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block2_1_conv[0][0]
__________________________________________________________________________
conv4_block2_1_relu (Activation (None, 14, 14, 256) 0
conv4_block2_1_bn[0][0]
__________________________________________________________________________
conv4_block2_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block2_1_relu[0][0]
__________________________________________________________________________
conv4_block2_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block2_2_conv[0][0]
__________________________________________________________________________
conv4_block2_2_relu (Activation (None, 14, 14, 256) 0
conv4_block2_2_bn[0][0]
__________________________________________________________________________
conv4_block2_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block2_2_relu[0][0]
__________________________________________________________________________
conv4_block2_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block2_3_conv[0][0]
__________________________________________________________________________
conv4_block2_add (Add) (None, 14, 14, 1024) 0
conv4_block1_out[0][0]
conv4_block2_3_bn[0][0]
__________________________________________________________________________
conv4_block2_out (Activation) (None, 14, 14, 1024) 0
conv4_block2_add[0][0]
__________________________________________________________________________
conv4_block3_1_conv (Conv2D) (None, 14, 14, 256) 262400
conv4_block2_out[0][0]
__________________________________________________________________________
conv4_block3_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block3_1_conv[0][0]
36
__________________________________________________________________________
conv4_block3_1_relu (Activation (None, 14, 14, 256) 0
conv4_block3_1_bn[0][0]
__________________________________________________________________________
conv4_block3_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block3_1_relu[0][0]
__________________________________________________________________________
conv4_block3_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block3_2_conv[0][0]
__________________________________________________________________________
conv4_block3_2_relu (Activation (None, 14, 14, 256) 0
conv4_block3_2_bn[0][0]
__________________________________________________________________________
conv4_block3_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block3_2_relu[0][0]
__________________________________________________________________________
conv4_block3_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block3_3_conv[0][0]
__________________________________________________________________________
conv4_block3_add (Add) (None, 14, 14, 1024) 0
conv4_block2_out[0][0]
conv4_block3_3_bn[0][0]
__________________________________________________________________________
conv4_block3_out (Activation) (None, 14, 14, 1024) 0
conv4_block3_add[0][0]
__________________________________________________________________________
conv4_block4_1_conv (Conv2D) (None, 14, 14, 256) 262400
conv4_block3_out[0][0]
__________________________________________________________________________
conv4_block4_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block4_1_conv[0][0]
__________________________________________________________________________
conv4_block4_1_relu (Activation (None, 14, 14, 256) 0
conv4_block4_1_bn[0][0]
__________________________________________________________________________
conv4_block4_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block4_1_relu[0][0]
__________________________________________________________________________
conv4_block4_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block4_2_conv[0][0]
__________________________________________________________________________
conv4_block4_2_relu (Activation (None, 14, 14, 256) 0
conv4_block4_2_bn[0][0]
__________________________________________________________________________
conv4_block4_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block4_2_relu[0][0]
__________________________________________________________________________
conv4_block4_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block4_3_conv[0][0]
__________________________________________________________________________
conv4_block4_add (Add) (None, 14, 14, 1024) 0
conv4_block3_out[0][0]
37
conv4_block4_3_bn[0][0]
__________________________________________________________________________
conv4_block4_out (Activation) (None, 14, 14, 1024) 0
conv4_block4_add[0][0]
__________________________________________________________________________
conv4_block5_1_conv (Conv2D) (None, 14, 14, 256) 262400
conv4_block4_out[0][0]
__________________________________________________________________________
conv4_block5_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block5_1_conv[0][0]
__________________________________________________________________________
conv4_block5_1_relu (Activation (None, 14, 14, 256) 0
conv4_block5_1_bn[0][0]
__________________________________________________________________________
conv4_block5_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block5_1_relu[0][0]
__________________________________________________________________________
conv4_block5_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block5_2_conv[0][0]
__________________________________________________________________________
conv4_block5_2_relu (Activation (None, 14, 14, 256) 0
conv4_block5_2_bn[0][0]
__________________________________________________________________________
conv4_block5_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block5_2_relu[0][0]
__________________________________________________________________________
conv4_block5_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block5_3_conv[0][0]
__________________________________________________________________________
conv4_block5_add (Add) (None, 14, 14, 1024) 0
conv4_block4_out[0][0]
conv4_block5_3_bn[0][0]
__________________________________________________________________________
conv4_block5_out (Activation) (None, 14, 14, 1024) 0
conv4_block5_add[0][0]
__________________________________________________________________________
conv4_block6_1_conv (Conv2D) (None, 14, 14, 256) 262400
conv4_block5_out[0][0]
__________________________________________________________________________
conv4_block6_1_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block6_1_conv[0][0]
__________________________________________________________________________
conv4_block6_1_relu (Activation (None, 14, 14, 256) 0
conv4_block6_1_bn[0][0]
__________________________________________________________________________
conv4_block6_2_conv (Conv2D) (None, 14, 14, 256) 590080
conv4_block6_1_relu[0][0]
__________________________________________________________________________
conv4_block6_2_bn (BatchNormali (None, 14, 14, 256) 1024
conv4_block6_2_conv[0][0]
__________________________________________________________________________
38
conv4_block6_2_relu (Activation (None, 14, 14, 256) 0
conv4_block6_2_bn[0][0]
__________________________________________________________________________
conv4_block6_3_conv (Conv2D) (None, 14, 14, 1024) 263168
conv4_block6_2_relu[0][0]
__________________________________________________________________________
conv4_block6_3_bn (BatchNormali (None, 14, 14, 1024) 4096
conv4_block6_3_conv[0][0]
__________________________________________________________________________
conv4_block6_add (Add) (None, 14, 14, 1024) 0
conv4_block5_out[0][0]
conv4_block6_3_bn[0][0]
__________________________________________________________________________
conv4_block6_out (Activation) (None, 14, 14, 1024) 0
conv4_block6_add[0][0]
__________________________________________________________________________
conv5_block1_1_conv (Conv2D) (None, 7, 7, 512) 524800
conv4_block6_out[0][0]
__________________________________________________________________________
conv5_block1_1_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block1_1_conv[0][0]
__________________________________________________________________________
conv5_block1_1_relu (Activation (None, 7, 7, 512) 0
conv5_block1_1_bn[0][0]
__________________________________________________________________________
conv5_block1_2_conv (Conv2D) (None, 7, 7, 512) 2359808
conv5_block1_1_relu[0][0]
__________________________________________________________________________
conv5_block1_2_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block1_2_conv[0][0]
__________________________________________________________________________
conv5_block1_2_relu (Activation (None, 7, 7, 512) 0
conv5_block1_2_bn[0][0]
__________________________________________________________________________
conv5_block1_0_conv (Conv2D) (None, 7, 7, 2048) 2099200
conv4_block6_out[0][0]
__________________________________________________________________________
conv5_block1_3_conv (Conv2D) (None, 7, 7, 2048) 1050624
conv5_block1_2_relu[0][0]
__________________________________________________________________________
conv5_block1_0_bn (BatchNormali (None, 7, 7, 2048) 8192
conv5_block1_0_conv[0][0]
__________________________________________________________________________
conv5_block1_3_bn (BatchNormali (None, 7, 7, 2048) 8192
conv5_block1_3_conv[0][0]
__________________________________________________________________________
conv5_block1_add (Add) (None, 7, 7, 2048) 0
conv5_block1_0_bn[0][0]
conv5_block1_3_bn[0][0]
__________________________________________________________________________
conv5_block1_out (Activation) (None, 7, 7, 2048) 0
conv5_block1_add[0][0]
39
__________________________________________________________________________
conv5_block2_1_conv (Conv2D) (None, 7, 7, 512) 1049088
conv5_block1_out[0][0]
__________________________________________________________________________
conv5_block2_1_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block2_1_conv[0][0]
__________________________________________________________________________
conv5_block2_1_relu (Activation (None, 7, 7, 512) 0
conv5_block2_1_bn[0][0]
__________________________________________________________________________
conv5_block2_2_conv (Conv2D) (None, 7, 7, 512) 2359808
conv5_block2_1_relu[0][0]
__________________________________________________________________________
conv5_block2_2_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block2_2_conv[0][0]
__________________________________________________________________________
conv5_block2_2_relu (Activation (None, 7, 7, 512) 0
conv5_block2_2_bn[0][0]
__________________________________________________________________________
conv5_block2_3_conv (Conv2D) (None, 7, 7, 2048) 1050624
conv5_block2_2_relu[0][0]
__________________________________________________________________________
conv5_block2_3_bn (BatchNormali (None, 7, 7, 2048) 8192
conv5_block2_3_conv[0][0]
__________________________________________________________________________
conv5_block2_add (Add) (None, 7, 7, 2048) 0
conv5_block1_out[0][0]
conv5_block2_3_bn[0][0]
__________________________________________________________________________
conv5_block2_out (Activation) (None, 7, 7, 2048) 0
conv5_block2_add[0][0]
__________________________________________________________________________
conv5_block3_1_conv (Conv2D) (None, 7, 7, 512) 1049088
conv5_block2_out[0][0]
__________________________________________________________________________
conv5_block3_1_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block3_1_conv[0][0]
__________________________________________________________________________
conv5_block3_1_relu (Activation (None, 7, 7, 512) 0
conv5_block3_1_bn[0][0]
__________________________________________________________________________
conv5_block3_2_conv (Conv2D) (None, 7, 7, 512) 2359808
conv5_block3_1_relu[0][0]
__________________________________________________________________________
conv5_block3_2_bn (BatchNormali (None, 7, 7, 512) 2048
conv5_block3_2_conv[0][0]
__________________________________________________________________________
conv5_block3_2_relu (Activation (None, 7, 7, 512) 0
conv5_block3_2_bn[0][0]
__________________________________________________________________________
conv5_block3_3_conv (Conv2D) (None, 7, 7, 2048) 1050624
conv5_block3_2_relu[0][0]
__________________________________________________________________________
40
conv5_block3_3_bn (BatchNormali (None, 7, 7, 2048) 8192
conv5_block3_3_conv[0][0]
__________________________________________________________________________
conv5_block3_add (Add) (None, 7, 7, 2048) 0
conv5_block2_out[0][0]
conv5_block3_3_bn[0][0]
__________________________________________________________________________
conv5_block3_out (Activation) (None, 7, 7, 2048) 0
conv5_block3_add[0][0]
__________________________________________________________________________
avg_pool (GlobalAveragePooling2 (None, 2048) 0
conv5_block3_out[0][0]
__________________________________________________________________________
dense (Dense) (None, 1024) 2098176
avg_pool[0][0]
__________________________________________________________________________
batch_normalization (BatchNorma (None, 1024) 4096 dense[0]
[0]
__________________________________________________________________________
activation (Activation) (None, 1024) 0
batch_normalization[0][0]
__________________________________________________________________________
dropout (Dropout) (None, 1024) 0
activation[0][0]
__________________________________________________________________________
dense_1 (Dense) (None, 1024) 1049600
dropout[0][0]
__________________________________________________________________________
batch_normalization_1 (BatchNor (None, 1024) 4096
dense_1[0][0]
__________________________________________________________________________
activation_1 (Activation) (None, 1024) 0
batch_normalization_1[0][0]
__________________________________________________________________________
dropout_1 (Dropout) (None, 1024) 0
activation_1[0][0]
__________________________________________________________________________
dense_2 (Dense) (None, 2) 2050
dropout_1[0][0]
Results show good accuracy of the model using ResNet architecture. Accuracy of almost 90% is
achieved. Approval exactness shows that much information is anticipated accurately by the
model contrasted with all the data. The graph of accuracy and loss against respective epochs are
41
.
The classification report for the ResNet experiment is displayed below. Notice that we precision,
fi-score and recall accuracy of 91% of benign and 90% of malignant respectively as shown in the
table 6 below.
42
CHAPTER FIVE
Skin cancer is increasing and affects many people every day. This cancer can be treated
successfully if it is detected in early stages. Early diagnosis and treatment will lead to an
In this paper a basic CNN model is put forward to differentiate melanoma skin lesion images
from non-melanoma images. Pre-processing, feature extraction and classification of data sets is
done by 5 layered AlexNet architecture and 3x3 convolutional layered ResNet architecture.
However, current clinical techniques used for the diagnosis of malignant melanoma are prone to
human error due to the subjectivity and novice physicians. Therefore, there is a need for more
reliable and accurate systems that can be beneficial to both expert and novice physicians.
This project proposed creative and effective methods to eliminate the subjectivity in visual
interpretation of dermoscopy images and decrease the number of false negative/ false-positive
diagnoses by introducing a new method for measuring abrupt cutoff and increasing the
performance of feature extraction algorithms. There are two main models used in this project:
The AlexNet architecture and the ResNet architecture, tested in classifying skin lesion
malignancy using deep learning algorithms. And hence, among the two algorithms according to
our experiment the ResNet architecture performs well with better accuracy of 90% and higher
precision, f1-score and recall compared to the AlexNet with 85% accuracy.
43
Further, to increase the accuracy and to reduce the loss percentage advanced architecture can be
implemented to get a better accuracy and can be implemented for clinical trials. Also, an
application can be developed which will be user friendly. This would also broaden the scope of
References
4. Waltz E (2017). Computer Diagnoses Skin Cancers: Deep learning algorithm identifies
https://spectrum.ieee.org/the-humanos/biomedical/diagnostics/computer-diagnosesskin-
cancers.
5. Braun Falco and G. Plewig (1994). The ABCD rule of dermatoscopy: High prospective
value in the diagnosis of doubtful melanocytic skin lesions," Journal of the American
and Statistics.
7. Pomponiu, V., Nejati, H., & Cheung, N. M. (2016). Deepmole: Deep neural
44
networks for skin mole lesion classification. In 2016 IEEE International Conference on
8. Codella, N. C., Gutman, D., Celebi, M. E., Helba, B., Marchetti, M. A., Dusza, S. W.,
&
Halpern, A. (2018). Skin lesion analysis toward melanoma detection: A challenge at the
9. Haenssle, H. A., Fink, C., Schneiderbauer, R., Toberer, F., Buhl, T., Blum, A., ... &
10. Han, S. S., Kim, M. S., Lim, W., Park, G. H., Park, I., & Chang, S. E. (2018).
Classification
of the clinical images for benign and malignant cutaneous tumors using a deep learning
11. Lopez, A. R., Giro-i-Nieto, X., Burdick, J., & Marques, O. (2017). Skin lesion
classification from dermoscopic images using deep learning techniques. In 2017 13th
IEEE.
12. Nasr-Esfahani, E., amavi, S., Karimi, N., Soroushmehr, S. M. R., Jafari, M. H., Ward,
K., & Najarian, K. (2016). Melanoma detection by analysis of clinical images using
45
convolutional neural networks. In 2016 38th Annual International Conference of the
IEEE
for computer aided diagnosis of pigmented skin lesions—A review. Biomedical Signal
14. Kanimozhi T, Murthi A. (2016). Computer Aided Melanoma Skin Cancer Detection
image-based computer aided diagnosis systems for skin cancer. In: Software,
16. Kim P. (2017). MATLAB Deep Learning with Machine Learning, Neural Networks
18. He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In:
770-778.
19. Shikha Rai A, Joswin Mark Monteiro, Namitha, Velentina Laira Veigas, T Nithin
Kumar (2020) Melanoma Skin Cancer Detection using CNN AlexNet Architecture
20. Gouda N, Amudha J (2020) Skin Cancer Classification Using ResNet. Am J Compt Sci
Inform Technol Vol.8 No.2: 52
46
21. Krizhevsky A, Sutskever I, Hinton G. (2017). ImageNet classification with deep
lesions: Comparison of the ABCD fule of dermatoscopy and a new 7-point checklist
based on pattern analysis, Archives of Dermatology, vol. 134, no. 12, pp. 1563-1570.
24. A. Masood (2016). Developing Improved Algorithms for Detection and Analysis of
Skin Cancer.
25. C. Bishop (2006). Pattern Recognition and Machine Learning, Information Science and
Statistics.
Technology.
27. O. Stenroos (2017). Object detection from images using convolutional neural networks,
28. Y. LeCun, L. Bottou, G. B. Orr and K. Muller (2012). Efficient backprop, Neural
29. Python Data Science Handbook Essential Tools for Working with Data by Jake
VanderPlas.
47
30. Mastering Python for Data Science: Explore the world of data science through Python
48