You are on page 1of 6

Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)

Performance analysis of Convolutional Neural


Network (CNN) based Cancerous Skin Lesion
Detection System
G.S.Jayalakshmi, V.Sathiesh Kumar,
Department of Electronics Engineering , Department of Electronics Engineering,
Madras Institute of Technology, Madras Institute of Technology,
Anna University, Anna University,
Chennai, India. Chennai, India.
jayalakshmigs.ece@gmail.com sathieshkumar@annauniv.edu

Abstract— This paper focuses on the classification of Deep learning technique allows the monitoring of the lesion
dermoscopic images to identify the type of Skin lesion whether automatically instead of frequent regular visit to
it is benign or malignant. Dermoscopic images provide deep dermatologist. Convolutional Neural Networks (CNNs)
insight for the analysis of any type of skin lesion. Initially, a provide efficient classification mechanism across many fine-
custom Convolutional Neural Network (CNN) model is
grained object categories with highly variable tasks [2].
developed to classify the images for lesion identification. This
model is trained across different train-test split and 30% split This paper focuses on Classification of skin lesion
of train data is found to produce better accuracy. To further types based on Batch normalized Convolutional neural
improve the classification accuracy a Batch Normalized networks. Advancement in computational hardware and
Convolutional Neural Network (BN-CNN) is proposed. The availability of open source dermoscopic dataset makes
proposed solution consists of 6 layers of convolutional blocks Neural Networks as an efficient method for image
with batch normalization followed by a fully connected layer classification.
that performs binary classification. The custom CNN model is
similar to the proposed model with the absence of Batch II. RELATED WORK
normalization and presence of Dropout at Fully connected
layer. Experimental results for the proposed model provided
Traditional lesion detection methods rely on hand-
better accuracy of 89.30%. Final work includes analysis of the crafted features based on ABCDE rule (Asymmetry, Border,
proposed model to identify the best tuning parameters. Color, Dermoscopic structure and Evolving) [3], 3-point
checklist [4], 7-point checklist [5], Menzies method [6] and
Keywords—Dermoscopic Image Analysis, Deep Learning, CASH (Color, Architecture, Symmetry, and Homogeneity)
Convolutional Neural Networks, Batch Normalization, Skin [7]. Numerous research works has been carried out to
Lesion, Skin Cancer. identify the skin lesion. These methods include hand-crafted
feature extraction methods, conventional machine learning
I. INTRODUCTION algorithms and deep learning techniques.
Skin lesion refers to any abnormalities on the skin • Lequan Yu et al. [8] proposed fully convolutional neural
that may be benign or malignant. Malignant lesions are network for segmentation and deep residual network for
cancerous. Early diagnosis and treatment of precancerous classification. To cope with the degradation and over-
skin lesion prevents the risk of cancer. WHO (World Health fitting problems as the network goes deeper residual
Organization) Statistics states that globally between 2 and 3 learning techniques were utilised [8]. Segmentation was
million non-melanoma skin cancers and 132,000 melanoma required due to limited amount of dataset around 1200
skin cancers occurs each year [1]. An additional 3,00,000 images. Though 85.5% accuracy was achieved using
non-melanoma and 4,500 melanoma skin cancer case will residual technique and fully convolutional network,
result due to 10% decrease in ozone levels [1]. computational complexity is greatly increased.
Generally, visual inspection of dermoscopic images • Arkadiusz Kwasigroch et al. [9] focused their research
requires a well-trained dermatology specialist. Due to on the application of transfer learning the existing
Intraclass variation (colour, texture, shape and location) and efficient convolutional neural networks (CNN) which is
Interclass Visual similarities of skin lesions, the diagnosis of a kind of Deep Neural Network (DNN), for automatic
skin lesion is a challenging task even for an expert classification of the skin lesions. VGG19, Residual
Physician. Hence, Invasive biopsy of the affected lesion is Networks (ResNet) and the hybrid of VGG19 with the
required for accurate diagnosis by doctors. A Dermoscopic Support Vector Machine (SVM) [9] are the three main
imaging technique utilizes non-polarized light source and a CNN that were analysed. These CNN architectures were
magnifying optics to capture and visualize deep skin analysed and validated over the ISIC dataset. Modified
structures. Unnecessary biopsies can also be avoided by VGG19 provided best performance with an average
analysing dermoscopic images prior to treatment as it accuracy of 81.2% compared to VGG19-SVM and
provides a non-invasive method for skin cancer detection. ResNet50 with 80.7% and 75.55% accuracies
With the emergence of deep learning approaches, intelligent respectively.
medical imaging based diagnosis system can be developed.

978-1-5386-9471-8/19/$31.00 ©2019 IEEE


Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)
• The approach proposed by Muhammad Ali Farooq et al. database was provided with the associated clinical metadata
[10] utilizes SVM (Support Vector Machine) and ANN in JSON (JavaScript Object Notation) file format that
(Artificial Neural Network) classifiers for classification contained diagnostic information screened and tested by
of skin lesion. ABCD data of the lesion images were expert specialists.
collected based on feature extraction by conventional The images from the database are sorted to benign
machine learning and image processing approaches. The and malignant classes based on the metadata provided. The
extracted features were applied to the SVM and ANN database contained uneven number of benign and malignant
classifiers to identify the level of the skin cancer. images. Equal number of images from each class is
• Kouhei Shimizu et.al [11] introduced task considered for unbiased classification. The shuffled dataset
decomposition strategy wherein separate classifier was of 2400 images from the database is then split for training
provided for each class. Color, sub-region and texture and testing subset.1200 benign and 1200 malignant images
related features were extracted by conventional image are chosen for analyzing the proposed CNN architecture.
processing techniques. The extracted features were Sample images from the dataset are shown in Fig 2.
applied to decomposed classifiers in a layered as well as
flattened approach.
• Barata et al. [12] introduced a Bag of Feature (BoF)
framework which uses four colour constancy algorithms
namely Gray World, max-RGB, Shades of Gray and
General Gray World, to normalize the the color
dermoscopy images. 1D RGB histogram features are
used to classify the images for melanoma detection.
Maximum accuracy of 79.2% was achieved on PH2
dataset using Shades of Gray algorithm.
Based on the extensive literature survey, it has (a) Benign (b) Malignant
been identified that further improvement in skin lesion
detection can be achieved. In this paper, batch Fig.2 Sample images from the dataset [13]
normalization in CNN layers are carried out to improve
the accuracy rate in skin lesion identification. B. Pre-processing of Dataset
Lesion type from each class was sorted by parsing
III. METHODOLOGY the response of diagnostic metadata in JSON description file
The overall workflow is described in the Fig.1 format with corresponding image file. The data is resized
which involves preprocessing of the images followed by and normalized. Images are resized to 400 x 400 pixels by
training and testing the dataset for prediction based on maintaining the aspect ratio to feed into the architecture.
binary classification. Anti-aliasing filtering technique is exploited to avoid the
pixel intensity distortion while resizing the images. Images
are normalized by dividing each RGB dimension of input
image pixel array by 255. Thus scaling of the pixel values is
between the uniform range of 0 to 1.

C. Convolutional Neural Network


CNN architecture is similar to regular neural nets
with input layer, hidden layer and an output layer. The input
to the neurons in deep neural networks is arranged in three
dimensions: (width, height, depth). CNN layers are formed
of neurons with different activation functions. The hidden
layers in CNN architecture is formed by a stack of
convolutional blocks that contains a series of convolutional
Fig.1 The overall workflow for skin lesion classification layer, nonlinear activation layer and a pooling layer. The
output layer is generally a fully connected dense layer that
acts as a classifier for prediction.
A. Dataset Preparation The hidden layers provide feature extraction, as the
The skin lesion dataset includes dermoscopic lesion input and output of convolutional layers are sets of 2D
images from International Skin Imaging Collaboration matrices called feature maps [9]. For an input feature map ,
(ISIC) archive [13]. ISIC archive is an open source public with filter of kernel/weight matrix and bias , the output
access database of standard clinical and dermoscopic images feature map is calculated by convolution operation of
provided especially for testing and validating models for weight matrix over the input feature as follows [14],
skin cancer identification. The database contained over
13,000 clinical as well as dermoscopic Skin images labeled --- (1)
as benign, malignant and unknown types. Each image in the

978-1-5386-9471-8/19/$31.00 ©2019 IEEE


Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)
The spatial value of an output feature map is computed regularization but with more rapid learning rates. Thus, BN-
based on volume size (W) of the input image to the CNN eliminates the need of dropout at fully connected layer.
convolutional layer , Filter size (F) , amount of Zero
Padding (P) and Stride Size (S). The output feature map size F. Implementation aspects
[15] of each convolution layer is given by, Neural network architecture is implemented using
Keras [18], a framework for deep learning in Python. A layer
--- (2) of abstraction is provided by Keras on top of Tensor flow
[19], which provides a framework for neural network to
D. Batch Normalization create deep learning models. Keras contains open source
While training a deep convolutional neural network python libraries for neural network thus allowing modularity
the input distribution of each layer changes due to the and extensibility for creating deep learning models. Using
python environment allows the user to utilize additional
changes in parameters from previous layer as a result of
Python dependencies like SciPy [20], PIL [21] and SciKit
convolution. This phenomenon is known as internal
learn [22].
covariant shift. The inputs are parameterized by varying
weights. This fluctuation of intermediate layer inputs affects
the learning rate of the model.
Batch normalization (BN) technique proposed by
loffe et al. [16] overcomes internal covariant shift with
adaptive reparametrization. BN updates all the layers
simultaneously along with layer independent training. This
improves performance and stability. Nonlinear transform
applied to each activation fixes the means and variances of
layer inputs. The output activation of each layer is
normalized with zero mean and unit variance. The mean and
variance are estimated after mini-batches rather than over
the entire training set. Consider a mini-batch B = { }
with dimension n and activation x. The mean and
variances of the mini batch are given by
--- (3)

--- (4)
Normalized output of a layer is given by the following
expression,

--- (5)
Here, represents numerical stability constant added to mini
batch variance.The scaled and shifted representation of xˆ is
given by the following expression with learnable parameters
and as,
--- (6)
The parameters and are learned per feature map rather
than per activation in a CNN architecture.

E. Proposed Solution
Deep learning method allows for automatic feature
extraction and improved classification even with very little
dataset [17]. Convolutional neural network (CNN/ConvNet)
architecture is chosen and implemented as Custom CNN
shown in Fig.3 (a). Custom CNN architecture consists of five (a)
convolutional blocks with increasing order of filter. This
architecture is further developed to a Batch normalized CNN
(b)
(BN-CNN) as shown in Fig.3(b) to improve the performance.
BN-CNN architecture is constructed from custom CNN with Fig.3 Network architectures (a) Custom CNN (b) BN-CNN
increased depth of six batch normalized convolutional blocks
with increasing order of filters. The difference between the IV. RESULTS AND DISCUSSIONS
two architecture is the addition of batch normalization after
each convolutional layer in BN-CNN. The fully connected The neural network model is trained and tested with the
layer of custom CNN contains dropout which introduces specified dataset with binary cross entropy as the loss
nonlinear distortion as it discards certain samples for function. ReLU activation function [23] classification at the
regularization. Batch normalization provides equivalent output node and the performance metrics such as accuracy,

978-1-5386-9471-8/19/$31.00 ©2019 IEEE


Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)
precision, recall and F-score were calculated [8]. The C. Optimizer Analysis
average measures of the performance metrics are provided The proposed model is analysed with different
for analysis. optimizers namely sgd, adagrad, Rmsprop, adam adaddelta,
A. Train – Test Split (Custom CNN) adamax and nadam [24]. From Fig.5 it is observed that
adaptive moment based optimizers produced better accuracy
The custom CNN model is trained and tested with
with reduced loss compared to Rmsprop and sgd. Adam
ReLu activation and adam optimizer and the model accuracy
optimizer gains the highest accuracy of 87.77% with
is evaluated for 10%, 20 % and 30% split of test data from
minimal loss of 0.27. Adam attained this global minimum
the overall dataset of 2400 images. Table.1 depicts that 30%
for the default learning rate of 0.001.
split produced efficient result.

TABLE.1 ACCURACY AND LOSS FOR CUSTOM CNN WITH DIFFERENT TEST
DATA SPLIT APPROACHES

DATA SPLIT AVERAGE LOSS


ACCURACY
Split 20% 0.7395 0.4908
Split 25% 0.7833 0.4559
Split 30% 0.8583 0.3067

B. Analysis of BN – CNN
The best data split of 30% is considered and the
batch normalized CNN model is trained and tested for three
different cases with respect to dropout. Dropout is a
regularization technique that ignores certain neurons n
during training and reduces the activation by a factor of n
Fig.5 Comparison of various optimizers based on average accuracy and loss.
(dropout rate) during testing.
D. Learning Rate analysis
Learning rate is an optimization parameter that
tends to minimize the loss function thereby reduces the
model’s error. The adam optimizer is analysed for different
learning rates 10 % above and below the default learning
rate of 0.001. Improved accuracy of 89.3% with a loss factor
of 0.2633 is achieved at the learning rate of 0.0001 as shown
in Table.2. It is also observed that the loss tends to increase
while further increasing or decreasing the learning rate from
the optimal rate of 0.0001.

TABLE.2 PERFORMANCE METRICS FOR DIFFERENT LEARNING RATES OF


ADAM OPTIMIZER AT 10 EPOCH WITH BATCH SIZE 32

LEARNING AVERAGE LOSS AVERAGE AVERAGE AVERAGE


RATE ACCURACY PRECISION RECALL FSCORE

0.01 0.5 8.0590 0.2500 0.5000 0.3333


0.001 0.8305 0.3924 0.8323 0.8306 0.8303
0.0001 0.8930 0.2633 0.8939 0.8939 0.8939
Fig.4 Analysis of BN_CNN with and without dropout based on 0.00001 0.8625 0.3123 0.8705 0.8625 0.8618
performance metrics.

Dropout with rate 0.25 at each layer alternate to


batch normalization layer produced high loss as more
number of activations at each BN_Conv_Blocks are
ignored. Dropout at fully connected layer improved
accuracy with loss trade off. Fig.4 shows that on analysis of
BN_CNN, the model without dropout produced improved
accuracy of 87.7% with minimal loss of 0.27.Thus
BN_CNN without dropout is chosen as a proposed model
for binary classification of skin lesion.
On comparing the results of custom CNN with BN-
CNN for 30% data split, BN-CNN provided improved
accuracy with reduced losss. Hence, the BN_CNN model is
chosen for further evaluation for improved accuracy by
tuning the two main hyperparameters, optimizers and
learning rate. Fig.6 Epochs Vs Average accuracy and loss.

978-1-5386-9471-8/19/$31.00 ©2019 IEEE


Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)
V. CONCLUSION
Following the hyper parameter tuning analysis the
The BN-CNN model was trained with binary cross
model is trained for different epochs with the best hyper
entropy loss function and 10 epochs with batch size 32 as
parameters and tested for the performance analysis. Fig.6
parameters. Adam optimizer with 0.0001 learning rate is
shows that the best result was obtained at less iteration of 10
chosen. The ISIC dataset is predicted using the proposed
epoch. With increase in epoch the accuracy tends to remain
BN-CNN model to obtain an average accuracy of 89.3%.
constant and the loss increases gradually and saturates.
Significant improvement in prediction is obtained with BN-
The confusion matrix for the best result is shown in
CNN compared to custom CNN.Thus, it is analyzed that
Fig.7 where class 0 and class 1 represent the malignant and
Batch normalization reduced over fitting and acted as a
benign classes respectively. The confusion matrix interprets
regularization technique providing better performance result
that 312 malignant and 313 benign images were predicted
for the binary classification of dermoscopic skin lesion
correctly out of 360 test images in each class. Fig.8 shows
images. This model can be utilized for further multiclass
examples of prediction results from the test subset.
classification for identifying the diagnosis type of the
detected skin lesion.
ACKNOWLEDGMENT
The authors would like to thank NVIDIA for providing
NVIDIA Titan X GPU under University Research
Programme.

REFERENCES
[1] WHO (World Health Organisation) statistics on skin cancer –
(http//www.who.int/uv/faq/skincancer/en/ /index1.html).
[2] Andre Esteva1, Brett Kuprel, Roberto A. Novoa, Justin Ko, Susan
M.Swetter, Helen M. Blau and Sebastian Thrun: “Dermatologist-
Fig.7 Confusion matrix for BN-CNN level classification of skin cancer with deep neural networks”, Nature
– International Journal of science , part of springer nature, vol 542,
February 2017, PP: 115 - 118.
[3] F.Nachbar, W. Stolz, T. Merkle, A.B. Cognetta, T. Vogt, M.
Landthalerv, P. Bilek, O. Braun-Falco, and G. Plewig. “The abcd rule
of dermatoscopy: high prospective value in the diagnosis of doubtful
melanocytic skin lesions”. In Journal of the American Academy of
Dermatology, 30(4), pp.551-559., 1994.
[4] H.P. Soyer. Three-point checklist of dermoscopy. In Dermatology,
(a) Predicted - 0 ; (b) Predicted - 1; 208(1), pp.27-31., 2004.
Ground truth - 0 Ground truth - 0 [5] G. Argenziano. Seven-point checklist of dermoscopy revisited. In
British Journal of Dermatology 164, no. 4 (2011): 785-790., 2011
[6] S.W. Menzies. A method for the diagnosis of primary cutaneous
melanoma using surfacemicroscopy. In Dermatologic clinics, 19(2),
pp.299-305., 2001.
[7] J.S. Henning, S.W. Dusza, S.Q. Wang, A.A. Marghoob, H.S.
Rabinovitz, D. Polsky, andA.W. Kopf. The cash (color, architecture,
symmetry, and homogeneity) algorithm for dermoscopy.In Journal of
(c) Predicted - 0; (d) Predicted - 1 ; the American Academy of Dermatology, 56(1), pp.45-52., 2007.
Ground truth - 1 Ground truth - 1 [8] Lequan Yu, Hao Chen, Qi Dou, Jing Qin and Pheng-Ann He ng:
“Automated Melanoma recognition in Dermoscopy images via very
deep residual networks”, IEEE transactions on medical imaging, vol.
Fig.8 Sample Images with predicted and ground truth values 36, no. 4, April 2017, PP: 994 - 1004.
[9] Arkadiusz Kwasigroch, Agnieszka Mikołajczyk and Michał
From the performance analysis, it is observed that Grochowski: “Deep neural networks approach to skin lesions
batch normalized CNN with tuned parameters produce a classification – a comparative analysis”, proceedings of IEEE
high accuracy in skin lesion detection as interpreted in conference on Methods and Models in Automation and Robotics,
September 2017, PP: 1069 – 1074.
Table.3.
[10] Muhammad Ali Farooq, Muhammad Aatif Mobeen Azhar and Rana
Hammad Raza: “Automatic Lesion Detection System (ALDS) for
TABLE.3 COMPARATIVE ANALYSIS OF ACCURACY FROM
Skin Cancer Classification Using SVM and Neural Classifiers”,
PREVIOUSLY PUBLISHED PAPERS proceedings of IEEE Conference on Bioinformatics and
Bioengineering, December 2016, PP: 301 - 308.
AUTHOR METHODOLOGY ACCURACY [11] Kouhei Shimizu, Hitoshi Iyatomi, M. Emre Celebi, Kerri-Ann
(%)
Norton, and Masaru Tanaka: “Four-Class Classification of Skin
Arkadiusz Transfer learning with 81.2
Lesions With Task Decomposition Strategy”, IEEE transactions on
Kwasigroch et al.[9] modified VGG-19
biomedical engineering, vol. 62, no. 1, January 2015, PP: 274 – 282.
Lequan Yu et al.[8] Deep residual network 85.5
[12] Catarina Barata, M. Emre Celebi and Jorge S. Marques: “Improving
Custom CNN 85.8 Dermoscopy Image classification using Color Constancy”, IEEE
Our proposed Journal of Biomedical and Health Informatics, Volume: 19, Issue: 3,
BN-CNN 89.3
May 2015, PP: 1146 - 1152.
[13] ISIC (International Skin Imaging Collaboration) archive –
(https://www.isicarchive.com/#!/topWithHeader/onlyHeaderTop/galle
ry).

978-1-5386-9471-8/19/$31.00 ©2019 IEEE


Second International Conference on Computational Intelligence in Data Science (ICCIDS-2019)
[14] Y. LeCun, K. Kavukcuoglu, and C. Farabet, ‘Convolutional networks
and applications in vision’, in Proceedings of 2010 IEEE International
Symposium on Circuits and Systems, 2010, pp. 253–256.
[15] Stanford University:online course“CS231n: Convolutional Neural
Networks for Visual Recognition”. [Online]. Available:
http://cs231n.github.io/convolutional-networks/.
[16] S. Ioffe and C. Szegedy, ‘Batch Normalization: Accelerating Deep
Network Training by Reducing Internal Covariate
Shift’,ArXiv150203167 Cs, Feb. 2015.
[17] Waseem Rawat and Zenghui Wang, “Deep Convolutional Neural
Networks for Image Classification: A Comprehensive Review”.
Neural computing. MIT Press Journals. Volume: 29, Issue: 9, 2017.
[18] "Keras documentation," https://keras.io/. .
[19] Tensorf"low documentation, “https://www.tensorflow.org/ api_docs “
[20] Scipy Python Library, “ https://www.scipy.org/docs.html”
[21] Python Imaging Library (PIL), “http://www.pythonweare.
comlproducts/pill.”
[22] SciKit Learn Library, “ http://scikit-learn.org/stable/documentation.
html.”
[23] Vinod Nair and Geoffrey E. Hinton, “Rectified Linear Units Improve
Restricted Boltzmann Machines” In. Proceedings of the 27th
International Conference on Machine Learning (ICML-10), June 21-
24 2010, Haifa, Israel.
[24] Sebastian Ruder, “An overview of gradient descent optimization
algorithms”, arXiv:1609.04747, 2015..

978-1-5386-9471-8/19/$31.00 ©2019 IEEE

You might also like