Skin Cancer Detection Using Transfer Learning, Sasikala Et. Al
Skin Cancer Detection Using Transfer Learning, Sasikala Et. Al
ABSTRACT
In present time, skin cancer is the deadliest disease among humans. In US, two persons die every hour owing to skin
cancer. Skin cancer is developed on the body when exposed to sunlight and is the abnormal growth of the skin cell.
The patient’s life can be saved through earlier and faster detection of skin cancer. The formal method of skin cancer
detection is Biopsy, it is done by removing the skin cells and testing the samples in a clinical lab. Biopsy method is
invasive and time-consuming. With the newer technologies, early detection of skin cancer at the initial stage is possible.
Image processing techniques are instrumental in the health care industry to detect abnormalities in the human body. In
this work, Convolutional Neural Network (CNN) algorithm with four different transfer learning techniques are used to
classify the images of the skin with dermoscopic analysis which enables fast detection. A CNN model is trained using
a dataset of 3700 clinical images and its performance is tested over 660 images which represent the identification of
deadliest skin cancer. A considerable improvement in accuracy of skin cancer detection using deep learning architecture
ResNet34 provides a reliable approach for early detection and treatment.
KEY WORDS: Convolutional Neural Network, Deep learning, detection, transfer learning, Skin
cancer.
55
NAAS Journal Score 2020 (4.31) SJIF: 2020 (7.728)
A Society of Science and Nature Publication,
Bhopal India 2020. All rights reserved.
Online Contents Available at: http//www.bbrc.in/
Doi: http://dx.doi.org/10.21786/bbrc/13.11/13
S. Sasikala et al.,
Benign is a non-cancerous which does not spread to accuracy. The Pre-processing increases the performance
any other parts of the body. It is caused due to exposure by noise removal. Post-processing enhanced the image
of sunlight, inflammation of skin, infections, and quality and the boundary of the cancer cell was enhanced.
genetics. The problem is that the dataset was too small. There was
no uniqueness in the image processing technique and
Melanoma mostly occurs in the skin rarely in the mouth the variations between the dermoscopy and the digital
and intestines with the abnormal cells that contain image were large. By increasing the number of images
melanocytes which control the pigment in our skin. For in the data set, high accuracy over training and testing
women, melanoma mostly occurs on the legs and for data set could be obtained [Lau, H.T. and Al-Jumaily,
men on the back. They usually develop from the mole A., (2009)].
with abnormal changes as an increase in size, changes
in the color, causes itches or skin breakdown. It can Skin cancer is the most common disease in human
occur in the areas between fingernails, palms, toenails and its incidence is increasing dramatically. The newer
and eyes [Miller .et. al. (1994)]. Benign usually appears technology-based detecting skin cancer is recommended
on the skin which is highly exposed to sunlight such as for accurate identification but the percentage of detection
face, shoulders, neck, hand and leg. This appears as lump by computer is comparatively high with manual
and looks like patches which continues after a week and detection. Here Digital Dermoscopy is widely considered
develops over a month or a year. as one of the most effective means to classify the skin
cancers. Segmentation of images is done using K-means
Skin cancer is the common type of cancer in worldwide algorithm. It includes various stages like skin image,
and especially in US. By the age of 70, skin cancer will be enhancement, lesion segmentation, feature extraction
developed by 1 in 5 Americans. In every hour, more than and finally classifying it to normal and abnormal.
2 people die because of skin cancer. Risk for melanoma Convolution Neural Network (CNN) for detection of
will be doubled while exposure of sunburns is more images, which is much cost-efficient in comparison
than 5 in number. Early detection helps to survive for 5 with digital dermoscopy gives accurate output with
years and the survival rate is 99 percent. At least 40% appropriate detection of the cancer. The model proposed
of cases have skin cancer when globally accounting for the automatic method of detecting skin cancer from
common cancer. Non-melanoma skin cancer occurs 2 the photographed image which was captured from the
to 3 million people per year. Globally in 2012, 232,000 affected area of the skin. In this, Support Vector Machine
people were in skin cancer, and 55,000 people died. (SVM) algorithm is used to classify the image which was
According to the survey of last 20 to 40 years, Australia either melanoma or benign. A total of 100 image for
(white people), New Zealand and South Africa People melanoma and 100 for benign was used in the study. The
have the highest rate of Skin cancer in the world [Apalla, eminent drawback of this method is that the data set did
Z.et. al. (2017)]. not contain the dark-skinned images. To overcome these
difficulties, more images are used to train the data and
The early detection involves Biopsy method, in that the to test the trained data with all types of images of the
damaged skin is removed and tested in laboratories which skin [Esteva, A et. al (2017)].
take longer duration for the detection of skin cancer and
it is more painful method. Computer Aided Diagnosis Three methods were used for the segmentation of
(CAD) is used to avoid the longer duration consumption Otsu's method, gradient vector flow and color-based
and it is a non-invasive method. Many works in literature segmentation using K-mean clustering. Otsu's method
[Sasikala, S. et al. (2018) & (2020)] have focused on did not require any variation in the parameter for the
machine learning, feature transformation, optimisation, different skin lesions. The gradient vector flow had the
and deep learning for improving the cancer diagnosis. active contour to boundary concavities although with
Henceforth, the proposed work aims to develop a CAD the presence of the noises. The drawback of it was the
system for early identification of skin cancer using deep execution speed to converge to the object. This method
learning. required the changing parameter for the different skin
lesions. In color-based classification, it had the possibility
The significant contributions of the proposed work of reducing the computational cost calculation for every
are: pixel in the image. To overcome these drawbacks, the
• To design a cost-effective CAD system for the early Convolutional Neural Network (CNN) algorithm with the
identification of skin cancer. back-propagation model is used for the fast execution
• To construct a deep learning model that can detect to converge the object image for training [Rubegni P et
and categorize given image into either a benign type al. (2012)].
or malignant type.
• To reduce training time by using pre-trained model An artificial neural network algorithm was used for the
with high accuracy rate. classification of the image and feature extraction for the
thresholding. This method involved a binary classifier for
Related Works: Automatic detection of skin cancer classifying benign and malignant tumor. By the result
involved pre-processing and the post-processing of the artificial neural network, the accuracy was low.
techniques for the classification of the image with high The different types of classification methods and image
56
S. Sasikala et al.,
processing techniques could be used for high accuracy algorithm was used in this method to classify the images
and the accurate detection of the cancer [Hosny, K.M., as melanoma or benign. The performance accuracy of
Kassem, M.A. and Foaud, M.M. (2018)]. the proposed model was high. The back-propagation
method was used to fine-tune the weights to classify the
Melanoma and benign lesions have high similarity, due images accurately. From the literature, it is observed that
to this it takes a long time to identify and classify. The using CNN with the ResNet 34 architecture gives high
automatic classification of skin lesions helps to reduce accuracy with the low error rate with the probability
time, efforts and one of the best ways to give an accurate of the classifier. Therefore, the proposed method for
identification of lesions. The use of transfer learning and classifying benign and malignant tumors using CNN
pre-trained neural network has been experimented. In this with ResNet architecture.
method, binary classifier model was used. This proposed
method provides accuracy around 96 percentage. The Material and Methods
weights are fine-tuned and the dataset undergoes various
rotation angles to overcome problems. From this paper, In the present time, machine learning and deep learning
we included a feature for greater accuracy for the better approaches are used in healthcare for improved
identification of lesions [Mahmoud, M.K.A., Al-Jumaily, diagnosis. In this work, Convolutional Neural Network
A. and Takruri, M (2011)]. (CNN) algorithm with four different transfer learning
approaches viz, AlexNet, VGG16, ResNet50, ResNet34 are
Rule based approach, back propagation and neural used to classify the images of the skin with dermoscopic
network was used to select the features and to classify analysis which enables fast detection. The workflow with
the lesions. The lesions were either melanoma or benign. RESNET 34 transfer learning is proposed in figure 1.
As in this, the number of correct classifications increased.
The neural network handled the complex relations
among the identification of lesions. This model had a Figure 1: Architecture for Skin Cancer detection
drawback of slow convergence rate and the trapping
of the local minima. To overcome this, CNN could be
used to increase the convergence rate and reduce the
complexity of classifying the images to increase the
trapping of the local minima [Mendes, D.B. and da Silva,
N.C. (2018)]. ResNet-134 architecture was used that was
trained over 3797 images and later 956 images were
tested with the network and achieved an accuracy of
about 78%. This technique took a long time to train the
data set of approximately 35 hours. The images were Table I represents the number of layers and the
not trained properly and led to the wrong prediction parameters used in the four transfer learning approaches
of the cancer lesions and made a problem for humans. used in this work.
By using ResNet 34, the time consumption to train the
data set and the accuracy could be reduced [Jain, S. and
Pise, N. (2015)]. Table 1. Different types of CNN Architectures Used
SVM algorithm and snake active contour were used for Name of the Number Number of
image segmentation. To reduce the complexity in SVM, Architecture of Layers Parameters
the snake parameters were used to predict the initial curve.
The segmentation and the classification of the images are
Alexnet 8 61M
not accurate. To overcome these difficulties, CNN with
ResNet 34 architecture could be used to detect the image VGG 16 16 138 M
accurately without any discrepancy [Aswin, R.B., Jaleel, ResNet 34 34 21.282M
J.A. and Salim, S. (2014)]. Computer-aided approach ResNet 50 50 23.521M
was used to detect skin cancer. The steps involved
in the detection of cancer are image pre-processing,
segmentation, feature extraction, and classification. Figure 2: Benign tumour Malignant tumour
Image resizing affected the quality of classification. By
using this method, segmentation process involved the
drawback was that the large stacks of data set could not
be used for the classification of the image. To overcome
these drawbacks, the CNN algorithm is used to classify
large data set for accurate results [Hosny, K.M., Kassem,
M.A. and Foaud, M.M.(2019)].
Data Base: The data sets are clinical images which which is a small matrix is used. The size of the typical
are collected from Kaggle [kaggle.com]. The dataset filter on the first layer of CNN is [5x5x3]. After
has images of benign and malignant skin lesions in a computing the dot product and by sliding the filter over
balanced number. It consists of malignant and benign the image, a convolved feature, activation map or feature
classes with 1800 images each. 70% of data is used for map is formed (output volume). The number of filters is
training and 30% for testing. A sample image in database known as depth. The size of the filter and the receptive
is shown in figure 2. field, which is the local region of the input volume are
the same. The set of neurons that are all pointing to the
Transfer learning is one of the machine learning receptive field is known as depth column or fiber. Stride
techniques, used to develop a model for any recognition/ is used for spatially producing smaller output volumes.
classification task. Also, it is the recommended method in
deep learning where pre-trained models are used as the Pool Layer: The function of this layer reduces the
starting point of analysis. In transfer learning, a model computational complexity of the model and spatial
trained on a single task is repurposed on another related dimensions of the given input data. Over fitting is also
task. It is an optimization that allows quick progress controlled by this layer. It does not depend on the depth
when modelling the new task. slice of the input. Different functions are Max pool,
Average pool or L2 norm-pool. Max pooling is the most
Convolutional Neural Network (CNN): A Convolutional important part of the input layer.
Neural Network (CNN or ConvNet) is a specialized type
of artificial neural network (ANN) which is used in image
processing, recognition and this is designed to process Table 2. Results obtained with four CNN models
pixel data. CNN has some layers as the input layer, an
output layer and hidden layers (multiple convolutional MODEL/ ResNet34 ResNet50 VGG16 AlexNet
layers, pooling layers, fully connected layers and Metrics
normalization layers) [Krizhevsky, A., Sutskever, I. and
Hinton, G.E(2017)]. The figure 3 represents the highly Accuracy 88.4 % 76.9 % 69.2 % 65.3 %
performing architecture of CNN. Input Layer. The input Error Rate 17.6 % 30.7 % 26.9 % 26.9 %
layer or volume is an image and the dimensions of the Sensitivity 0.875 0.875 0.875 1
image are [width x height x depth]. This dimension Specificity 0.778 0.875 0.556 0.5
denotes the matrix of pixel values. For example, input
F1 score 0.736 0.736 0.608 0.64
is [32x32x3]. So width=32, height=32 and depth=3. Here
the depth represents R, G, B channels. And the input
volume should be divisible number of times by 2.
Table 3. Epoch Vs accuracy and error rate table
58
S. Sasikala et al.,
59
S. Sasikala et al.,
nature, 542(7639), pp.115-118. based diagnosis of melanoma using only useful image
He, K., Zhang, X., Ren, S. and Sun, J., (2016). Deep features. In 2018 International Workshop on Advanced
residual learning for image recognition. In Proceedings Image Technology (IWAIT) (pp. 1-4). IEEE.
of the IEEE conference on computer vision and pattern Mahmoud, M.K.A., Al-Jumaily, A. and Takruri, M.,
recognition (pp. 770-778). (2011). The automatic identification of melanoma by
Hosny, K.M., Kassem, M.A. and Foaud, M.M., (2018). wavelet and curvelet analysis: study based on neural
Skin cancer classification using deep learning and network classification. In 2011 11th International
transfer learning. In 2018 9th Cairo International Conference on Hybrid Intelligent Systems (HIS) (pp.
Biomedical Engineering Conference (CIBEC) (pp. 90-93). 680-685). IEEE..
IEEE. Mendes, D.B. and da Silva, N.C., (2018). Skin lesions
Hosny, K.M., Kassem, M.A. and Foaud, M.M., (2019). classification using convolutional neural networks in
Classification of skin lesions using transfer learning clinical images. arXiv preprint arXiv:1812.02316..
and augmentation with Alex-net. PloS one, 14(5), Rubegni P, Cevenini G, Burroni M, Perotti R, Dell'Eva
p.e0217293. G, Sbano P, Miracco C, Luzi P, Tosi P, Barbini P,
https://www.kaggle.com/fanconic/skin-cancer- Andreassi L. (2002) Automated diagnosis of pigmented
malignant-vs-benign skin lesions. International Journal of Cancer. 2002 Oct
Jain, S. and Pise, N., (2015). Computer aided melanoma 20;101(6): 576-80.
skin cancer detection using image processing. Procedia Sasikala, S., Bharathi, M. and Sowmiya, B.R., (2018).
Computer Science, 48, pp.735-740.. Lung Cancer Detection and Classification Using Deep
Krizhevsky, A., Sutskever, I. and Hinton, G.E., (2017). CNN. International Journal of Innovative Technology
Imagenet classification with deep convolutional neural and Exploring Engineering (IJITEE) ISSN, pp.2278-
networks. Communications of the ACM, 60(6), pp.84- 3075.
90. Sasikala, S., Ezhilarasi, M. and Kumar, S.A., (2020).
Lau, H.T. and Al-Jumaily, A., (2009), December. Detection of breast cancer using fusion of MLO and
Automatically early detection of skin cancer: Study CC view features through a hybrid technique based
based on neural netwok classification. In 2009 on binary firefly algorithm and optimum-path forest
International Conference of Soft Computing and Pattern classifier. In Applied Nature-Inspired Computing:
Recognition (pp. 375-380). IEEE. Algorithms and Case Studies (pp. 23-40). Springer,
Mustafa, S., & Kimura, A. (2018, January). An SVM- Singapore.
60