Skin Cancer Classification Using ResNet

Niharika Gouda1* and Amudha J2

1Università degli Studi dell’Aquila, L’Aquila, Italy

2Department of Computer Science, Amrita Vishwa Vidyapeetham, Bangalore, India

*Corresponding Author:
Niharika Gouda
Università degli Studi dell’Aquila
L’Aquila, Italy
E-mail: niharikagouda92@gmail.com

Received Date: June 05, 2020; Accepted Date: June 18, 2020; Published Date: June 24, 2020

Citation: Gouda N, Amudha J (2020) Skin Cancer Classification Using ResNet. Am J Compt Sci Inform Technol Vol.8 No.2:52. DOI: 10.36648/2349-3917.8.2.52

Copyright: © 2020 Gouda N, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Abstract

Since skin disease is one of the most well-known human ailments, intelligent systems for classification of skin maladies have become another line of research in profound realizing, which is of incredible importance for the dermatologists. The exact acknowledgement of the infection is very challenging due to complexity of the skin texture and visual closeness of the disease. Skin images are filtered to discard undesirable noise and furthermore process it for improvement of the picture. We have used 25,331 clinical-skin disease images, the training images from varying lesions of eight categories and having no-skin ailments at different anatomic sites to test 8238 images. The classifier was used for classification of skin lesions such as Melanoma, Melanocytic nevus, Basal cell carcinoma, Actinic keratosis, Benign keratosis, Dermatofibroma, Vascular lesion and Squamous cell carcinoma. Complex techniques such as Residual Neural Network (ResNET) which is a type of Convolutional Neural Network is used to classify the image and obtain the diagnosis report as a confidence score with high accuracy. ResNet is used to make the training process faster by skipping the identical layers. There is an effective improvement in training process in every successive layer. Analysis of this investigation can help specialist to in advance diagnosis, to know the kind of infection and begin with any treatment if required.
 

Keywords

ResNet; Fully connected layer; Batch normalization; Convolution layer; Max pooling layer; Epoch

Introduction

Skin disease is one of the most widely recognized malignant growth types [1]. It is the most well-known malignant growth type in the United States, and it is assessed that one in five Americans will create skin malignant growth in the course of their life. Among various kinds of skin tumors, harmful melanoma (the deadliest sort) is liable for 10,000 deaths yearly just in the United States [2]. But if it is detected early it tends to be relieved through a straightforward extraction while analysis at later stages is related with a more serious danger of death - the evaluated 5-year endurance rate is over 95% for beginning time recognition, yet beneath 20% for late stage recognition [3]. There are various non-intrusive instruments that can help dermatologists in determination, for example, perceptible pictures which are gained by standard cameras or cell phones. These pictures have ill effects of low quality. Significantly better picture quality is given by dermoscopic gadgets which have become a significant noninvasive apparatus for identification of melanoma and other pigmented skin sores. Dermoscopy bolsters can be better separated between various sore sorts depending on their appearance and morphological highlights [4].

Melanoma as a disease is a very malignant disease, it is very hard to identify it with conventional methods such as ordinary cameras. Melanoma disease is harmful for the DNA, it causes overexposure to the skin cells by the UV rays resulting in pigmentation of the skin. If melanoma is not identified in the early stage, it penetrates much deeper and destroys the lymph nodes and blood [5]. Hence, here deep learning methods like CNN and ResNet comes into picture and helps a lot.

Methodology

Nowadays, CNN (Convolutional Neural Networks) have worked well in the field of object detection, image classification [6]. 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.

Characterization of melanoma disease was carried out earlier. SVM, KNN, decision tree techniques were used to detect these deadly diseases with a precision of 0.8-0.9. And again, CNN and ResNet was used which could get a precision of 0.91. In 2012, the classification of skin disease started and over 2017, ResNet was introduced to get a better accuracy and hence speed up the process of easy identification of these diseases. Over the years these classification methods are improving, and the accuracy results are getting better. New techniques in deep learning is helping medical industry in a big way. It takes highly specialized practitioners to properly recognize the extent of the skin disease and its spread. Sometimes, the images are with noise and other difficulties like low contrast and these images should be segmented to remove noise, and image artefacts like hairs and bubbles around the image to improve the quality of the images for proper detection. Proper segmentation and normalization of figure should be done for proper analysis. Utilizing CNNs, which are pre-prepared on a huge dataset of characteristic pictures, as upgraded includes extractors for skin sore pictures which can possibly conquer the downsides of regular methodologies. Various works have attempted to extricate profound highlights from skin sore pictures and afterward train an old style classifier. Likewise, the pre-trained systems were constrained to a solitary system. In, a solitary pre- prepared AlexNet was utilized while utilizing a solitary preprepared VGG16, used a solitary preprepared Inception-v3 net.

Hence, we will be understanding about the ResNet mechanism and a way of accurately classifying the skin diseases and producing a report in a user readable form for further analysis of the skin diseases. The dataset used is ISIC for skin lesion analysis towards melanoma detection. We also try to classify the testing images into 9 classes such as: Melanoma, Melanocytic nevus, Basal cell carcinoma, Actinic keratosis, Benign keratosis, Dermatofibroma, Vascular lesion, Squamous cell carcinoma and benign cells shown in Figures 1 and 2.

computer-science-technology-Melanoma

Figure 1: Distinguishing between Melanoma(cancerous) and benign cells.

computer-science-technology-dataset

Figure 2: Input dataset having melanoma and others.

Implementation

Dataset

We use the training, validation and test images of the ISIC 2019 competition. In total, 25331 jpeg colour dermoscopic skin images are used which include 4522 malignant melanoma(MEL), 12875 Melanocytic nevus (NV), 3323 Basal cell carcinoma (BCC), 867 Actinic keratosis (AK), 2624 Benign keratosis (BK), 239 Dermatofibroma (DF), 253 Vascular lesion (VASC), 628 Squamous cell carcinoma (SCC) and benign cells. The images are of various sizes (from (767, 1022, 3 pixels) to (120,90, 3 pixels), photographic angles and lighting conditions and different artefacts such as the ones shown in Figure 2. A separate set of 8238 skin images is provided as a testing set. It is these validation images that we use to evaluate the results of our proposed method.

Pre-processing

Regularly pre-preprocessing is included to improve picture differentiation, perform white adjusting, apply shading standardization or alignment, or expel picture relics, for example, hairs or air pockets. We apply three standard techniques for pre-processing of images: first, we normalize the images by reducing RGB value of the dataset. Then, we do resize of the image to (120,90) to capture important characteristics of the image. Lastly, we perform segmentation and other noise removal techniques so that the image can be properly visualized.

Deep learning models

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 [7]. The motivation behind the Deep Residual Network is to make ANN with more profound layers with high exactness [8]. 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 3. 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 11 convolution layers, 6 max pooling layers and 10 batch normalization layers shown in Figure 4 and utilizing 500 epochs to achieve better accuracy.

computer-science-technology-ResNet

Figure 3: ResNet structure.

computer-science-technology-Architecture

Figure 4: ResNet 34 Architecture.

Fully connected layers

Learning is normally used to complete comparable errands. This procedure is utilized to abbreviate the model preparing time. The individual layers which helps in characterizing the 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

Like an information growth, dropout is additionally a regularization technique. At every cycle, the dropout closes off various arbitrary neurons at the predefined layer and doesn't utilize the neurons in forward engendering and back-spread.

Data augmentation

Data augmentation is one of the regularization strategies. The motivation behind regularization is to abstain from overfitting the made model. Regularization will improve the exhibition of the model on information that has never been seen. Information enlargement is an information control strategy without losing the center or quintessence of the information. Information expansion is done to get a bigger number of information than the first information (manufactured information).

Results and Discussion

After pre-processing and going through the data, handling the missing entries and adding median values, removing the noise, hair artefacts and segmentation, after resizing of the picture, the next step is training of the set with the help of ResNet. Also, another step to be noted is as it’s a part of ISIC competition 2019, we have to map the training data image dataset with the ground reality document. After training we can get the accuracy as well as loss.

Results show good accuracy of the model using ResNet architecture. Accuracy of almost 92% is achieved. Approval exactness shows that much information is anticipated accurately by the model contrasted with all the data. The approval exactness got in the chart above is the approval precision of the information that has been cleaned, without oversampling and under sampling shown in Figure 5.

computer-science-technology-showing

Figure 5: Results showing model accuracy.

We obtain the probabilities against each disease in a CSV file. Ideally, the image should have only one value as the particular disease and others should be indicated as 0. But we get distinct values for all the diseases. Hence, we have to use threshold and sensitivity value to arrive at a conclusion whether the disease has occurred or not.

For the final classification, we have to use diagnosis confidences which are in the interval [0.0,1.0] where 0.5 is the binary classification threshold. All the values of diagnosis confidences scores which are in the range (0.0, 1.0) with a threshold of 0.5 is converted with the help of sigmoid conversion:

1+e^(-(x-b))

Where x is the original diagnosis score, b is the binary threshold and a is the scaling factor. The disease with the highest value after the sigmoid conversion indicates that disease is more probable and likely to have happened as shown in Figure 6.

computer-science-technology-file

Figure 6: Pushing the results to a CSV file.

In Figure 6, it shows that the disease which has the highest value corresponding to the disease shows that the disease is most probable and likely to have occurred. These calculations are done in the code to get a CSV file every time which converts all the diagnosis confidence and gets a value above the binary threshold value [9-11].

Conclusion

This experiment looks for the best ResNet model with a plan with data augmentation, and with information expansion and dropout. The best models got in this examination utilizing 500 iteration training is the ResNet 34, that gives accuracy of 0.92. We have proposed a model which can automatically detect skin lesions and help practitioners in a big way to identify the spread of the disease in an early course of time which will help the population to eradicate this type of diseases. CNNs prove to be very useful in helping the doctors for this disease. But the other trained models like VGGNETs, ResNet- 34 are largely helpful in achieving better results of classification. ResNet apart from image classification also does Object detection, using eye tracking device, is a well-known research area in the field of Computer Vision and Image Processing which deals with finding the particular object or target in images. Artificial Neural Networks (ANNs) were developed to mimic the behaviour of biological neurons; the first ideas and models are over fifty years old. The combination of machine learning/Deep Learning techniques improves the machine vision systems, for identifying and recognizing the patterns which is based on computer vision applications. Hence, we can conclude that CNNs and other pretraining classifiers are helping all the industry in a big way.

The proposed method classifies the diseases into 9 classes after the feature extraction happens for all the nine classes. Then recalculates the result in CSV file with the formulas used for sigmoid conversion, this way it properly justifies the image has which disease up to what degree and clearly indicates which disease has occurred.

References

Select your language of interest to view the total content in your interested language

Viewing options

Flyer image
journal indexing image

Share This Article