Detection of Benign and Malignant Tumors in Skin Empowered with Transfer Learning

Skin cancer is a major type of cancer with rapidly increasing victims all over the world. It is very much important to detect skin cancer in the early stages. Computer-developed diagnosis systems helped the physicians to diagnose disease, which allows appropriate treatment and increases the survival ratio of patients. In the proposed system, the classification problem of skin disease is tackled. An automated and reliable system for the classification of malignant and benign tumors is developed. In this system, a customized pretrained Deep Convolutional Neural Network (DCNN) is implemented. The pretrained AlexNet model is customized by replacing the last layers according to the proposed system problem. The softmax layer is modified according to binary classification detection. The proposed system model is well trained on malignant and benign tumors skin cancer dataset of 1920 images, where each class contains 960 images. After good training, the proposed system model is validated on 480 images, where the size of images of each class is 240. The proposed system model is analyzed using the following parameters: accuracy, sensitivity, specificity, Positive Predicted Values (PPV), Negative Predicted Value (NPV), False Positive Ratio (FPR), False Negative Ratio (FNR), Likelihood Ratio Positive (LRP), and Likelihood Ratio Negative (LRN). The accuracy achieved through the proposed system model is 87.1%, which is higher than traditional methods of classification.


Introduction
Cancer is the most commonly known, developing, and most dangerous disease all over the world [1]. Skin cancer is one of the types of cancer. According to the present measures of the World Health Organization (WHO), 2 to 3 million nonmelanoma and 132000 melanoma skin cancer cases turn out globally each year. Out of three diagnosed, one is skin cancer according to the reports of Skin Cancer Foundation Statistics (SCFS) [2]. Skin cancer emerges from the skin. It is an unusual growth of skin cells. ese skin cells can invade the other body parts' cells. Maximum cases come out due to the Ultraviolet (UV) rays of the sun. But cases also come out on areas of body parts which are not ordinarily exposed to sunlight. Skin cancer is further divided into three main types: basal cells carcinoma (BCC), squamous cell carcinoma (SCC), and melanoma [3]. BCC is caused by damaged cells and causes changes in DNA, the basal cells of the outer layer of skin [4]. SCC of skin is caused by exposing skin to UV radiation for a longer duration. is radiation may be from sunlight or from lamps or any other such type of source [5]. Melanoma can spread from any part of our body. is disease attacks our normal skin and makes it cancerous. Melanoma mostly appears on the face or the trunk of affected men. In women, melanoma mostly appears on lower body parts like legs. Mostly, it spreads out on those parts of the body that are not directly exposed to sunlight [6]. In the detection of malignant tumors, many challenges have been faced. e factors such as images of different shapes and sizes, presence of noise in images, tumors irregular boundaries, and similarities with neighbor's tumors confused right identifications. For this purpose, image analysis methods were followed [7]. Computer-Aided Systems (CADs) identified border detection and extract required features. In CADs, different classification algorithms that automatically classified lesions into their relevant class are used [8]. One of them is AlexNet. It is a modest and strong CNN model consisting of convolutional and pooling layers and some fully connected layers [7]. In the proposed system, the problem is to classify benign and malignant tumors of the skin. Malignant tumors are severe types of tumors that grow and spread uncontrollably. ese are called cancerous. While benign tumors remain there where they appear, they do not spread across other areas of the body. ey are not much more problematic. e detection of skin cancer in starting days can be treated well and chances of recovery are high.
rough novel techniques, this is possible [9]. e novel approaches of deep learning methods are mostly applied not only for skin cancer but also for other varieties of cancers like breast cancer, brain cancer, lungs cancer, and prostate cancer. In the literature, more algorithms for skin cancer images classification are proposed. But this is still a very challenging task. e problem must be addressed in ways as follows: skin cancer images boundaries might have full contour with maximum curves and small angles. It is still a question that how many images of skin cancer are needed to be trained and analyzed, partially answered [10], and still, it is an issue. In the proposed system model, a large dataset is used to handle this problem. rough this, we achieved maximum accuracy. It is relatively previous work better to deal with this problem. In this article, image base dataset of benign tumors and malignant tumors is used. A customized AlexNet model is applied. e AlexNet model is customized according to the existing problem for achieving high results.
e customized existing AlexNet model consists of a total of 25 layers. ere are 5 convolutional layers in this model. e initial layers are fixed and already trained. e last three layers are customized according to the proposed system output classes. It is a binary classification problem. So, the softmax layer is changed and set labeled according to output classes. e customized AlexNet layers are trained according to the dataset which is used in this proposed system. e input parameters for fully connected layers are the size of output classes which is of binary classification. Softmax layers applied softmax functions on providing input data. Fully connected layers are modified according to our classes' particular features. After that, these fully connected layers are able to train the model according to the classes' specific features. e rest of the paper is set as follows. In Section 2, related work is described, Section 3 describes the material and methods which are used for this prediction, Section 4 comprises simulation and discussion of the result of the paper, and Section 5 is about the conclusion.

Literature Review
In the literature review, most of the representative approaches were used for skin cancer images classification. Diagnosis of any disease is very important for further proceeding and treatment. e same is in the case for skin disease; it is a challenging task for researchers to diagnose disease in its early stages. Different researchers applied different approaches to diagnose skin disease. ese approaches include the following. Garg et al. proposed a system using Convolutional Neural Networks (CNNs) [11]. Masood and Al-Jumaily proposed a methodology that is tested on skin cancer datasets but it can be used and tested in any area where scarcity of labeled data is an issue. eir research demonstrates using data that is not a label for training the algorithm. For this purpose, they use a partially supervised method. e proposed research achieves 86.5% accuracy [12]. Mhaske and APhalke presented that Support Vector Machine (SVM) performs best rather than K-Mean's clustering and Neural Network (NN) for melanoma skin cancer and achieves 80% accuracy [13]. Fidan et al. did work on the ph2 dataset and presented that abnormal and melanoma skin cancer with NN and decision support system would help dermatologists in diagnosing skin lesions [14]. Amirreza and his fellow researchers developed a hybrid Deep Neural Network (DNN) for the classification of skin lesions. ey used pretrained AlexNet, VGG16, and ResNet-18 for feature generators. After that, the SVM classifier was applied on 150 validation images, and for melanoma, 83.83% accuracy was achieved [15]. Rehman et al. presented work that consists of CNN for feature extraction, and after that, they used an ANN classifier for the detection of malignant lesions [16]. Monisha et al. presented ABCD dermoscopy for malignant recognition using backpropagation NN to rearrange harmful stage [17]. Albahar proposed a system using deep CNN applying a novel regularizer technique [18]. Jain presented work using Probabilistic Neural Network (PNN) classification for malignant lesions detection [19]. Maurya et al. presented that they used Grey Level Cooccurrence Matrices (GLCMs) for feature extraction, and after that, multiclass SVM applies and achieves 81.43% accuracy [20]. Pomponiu et al. presented DNN for feature extraction automatically and perform classification of skin lesions for malignancy on clinical dataset [21]. Esteva et al. presented using single CNNs train on 129,450 clinical images for versus benign and malignant melanomas versus [22]. In [23], a dataset with 19398 images was used for skin diseases classification, and the authors used an eight-layer CNN model on a dataset that has 900 images. Jianfeng He et al. constructed an 8-layer CNN model using a dataset containing 600 images for testing the model. Seifedine Kadry 2 Computational Intelligence and Neuroscience et al. proposed a system for the assessment of Skin Melanoma (SM) using a CNN-based approach. Using the VGG-SegNet scheme firstly, they extract the SM part From the Dermoscopy image. After that, the proposed technique was validated using the ISIC2016 database [24]. Attique et al.
proposed a system in which they used a segmented RGB images dataset, which they later passed through the Den-seNet model, extracting features. For this purpose, average pool and fully connected layers are applied. Later on, the combined result is forwarded to the feature selection block for downsampling using the proposed entropy controlled least square SVM. For next, they used three different datasets for validation and then measure the performance of RCNN [25]. Oluwakemi et al. proposed using the SqueezeNet deep learning model to improve the data augmentation model for effective detection of melanoma skin cancer [26]. Pham et al. [27] expose a comparative study technique through which they reveal that the color and shape of melanoma lesions are useful for classification with benign lesions. In their technique, they apply six classifiers along with seven feature extraction methods, performing data preprocessing by taking two datasets, and revealed that Random Forest is the best classifier with an accuracy of 81.46%. Pai and Giridaran [28] build a system using a VGG-16 customized CNN model, classifying various seven types of skin lesions. is system predicts the most probable types of skin lesions from given with 78% accuracy. Emrah and Zengin presented research [29] on the "HAM10000" dataset in which they use the K-Fold Cross Validation technique to distinguish seven different classes for training and testing purposes. After that, they applied VGGNET-16 architecture and obtain 85.62% accuracy.

Limitation of Related Work and Contribution
In [12], semilabelled data is used, the size of the dataset was less, only 1050 images were used, and an SVM classifier was applied which was unable to gain a maximum score. Handcrafted features were used in their proposed system too.
In [15], a less number of images were used in this system to validate the system, only 150 images. So, the malignant class achieved 83.83% accuracy, which is less as compared to the proposed system.
A fixed number of weights were used in [15], so maximum accuracy was not achieved.
In [30], a less number of images were used to train and after that to validate the system. So, this system without augmentation gained only 80% accuracy which is not up to the mark.
In the approach proposed in [20], a less images dataset was used, only 359 images are used in their proposed work, a multiclass SVM algorithm was applied, and the system gained only 81% accuracy which is minimum to the proposed approach.
Contrary to work done before, the proposed approach in this paper does not rely on handcrafted features. In the proposed approach, transfer learning intends to apply with Deep Convolutional Neural Network (DCNN) AlexNet pretrained network. Moreover, the proposed system network model is trained on 1920 images; each class contains 960 images. e size of the images was the same in both classes. Firstly, features are extracted through DCNN, and after that, a customized pretrained network is trained. After that, the proposed system network model is validated on 480 images.
ese are the specialties of the proposed system model. So, it performs better than earlier approaches.

Materials and Methods
In this section, materials for the paper and work done on the proposed system are briefly described.

4.1.
Dataset. In the proposed system, a publicly available dataset is used taken from the Kaggle repository [29]. It is an images base dataset that consists of two different classes: class 1 is named malignantly segmented and the second one is named benignly segmented. Sample image of class 1 is given in Figure 1 and sample image of class 2 is given in Figure 2. e original dataset consists of a total of 2637 images, the size of each class is imbalanced, and so 2400 images have been selected for the proposed system model where each class comprises 1200. AlexNet has been trained on over a million images and classifies images into 1000 objects categories. In the proposed system, the pretrained AlexNet model is modified according to the problem taken in the proposed system. In the proposed model, the AlexNet model is trained on 1920 images that belong to two classes.

Model for Proposed System.
e graphical diagram of the proposed system model is given in Figure 3. e proposed model consists of a total of 25 layers. e first layer of the proposed model is the image input layer, and the dimension of the input image is 227 × 227 which is specified for the AlexNet model [15]. e RGB coloring scheme is used for input images. ere are 5 convolutional layers in the proposed model.
RelU activation function is used for activation. Normalization and pooling are also done within different convolutions. e last three layers are modified according to the proposed system problem, respectively, with 2 fully connected layers against the weights given 2 × 4096 bias added 2 × 1 and tuned. e next is the softmax classification layer that classified input images according to option sets in the trained model. e last layer in the proposed system model is class output cross-entropy with classes benign and malignant.

Transfer Learning (Modified AlexNet).
One of the most famous techniques in the current era is deep learning, which is used in different fields of life such as the prediction of diseases, transportation, aeronautics, and agriculture. AlexNet is a pretrained convolutional network model. Transfer learning, a process of using a pretrained model, is commonly applied in deep learning applications [30]. Different deep learning pretrained models are used to tackle different types of real-world problems. In the proposed system model, the pretrained AlexNet model of deep learning is used for transfer learning intended for the detection and classification of malignant and benign tumors. Table 1 represents the architecture of pretrained AlexNet which is composed of convolutional layers, pooling layers, and fully connected layers. AlexNet network model is a pretrained CNN network model and has a huge impact on the recently used application of deep learning. is CNN network is modified according to our problem requirement, and then, images were passed to our proposed modified AlexNet transfer learning network model. e last three layers are modified and customized according to our proposed system problem, and these layers are the output classification layer, fully connected layer, and softmax layer. e modified and customized network model is used for transfer learning.

Training and Validation Phase.
In this phase, initially, pretrained AlexNet model is modified and then trained according to the proposed system problem. Firstly, we divide the dataset with a ratio of 80% and 20%. ere are a total of 2400 images in the dataset which are used in the proposed model. After division, 1920 images are separated for training purposes, and the rest of 480 images would be used in the validation phase. Modified pretrained AlexNet model is trained on different epoch values of 10, 20, and 30, respectively. e learning rate of 0.001 is fixed in all epochs. After training, the phase model is validated on images that are separated already for validation purposes in the proposed system.

Data Acquisition Layer.
In this layer, the data is acquired on which model has to be trained. ere are a total of 2400 images in this dataset. It is a classification type dataset; classes' names are malignant and benign tumors. e model has to classify the input images into one of the classes: malignant or benign.

Data Preprocessing Layer.
For further processing, first, we need to process data in such a form that will be more effective for the model. e original dataset is not in such a form that the model will be trained on it directly. Images are not according to the AlexNet requirements. AlexNet model only can be trained on data having a size of 227 × 227 and a coloring scheme of RGB. It is all done using Image Batch Processor.

Application
Layer. Till now, the data acquisition process is completed and also data is set according to the requirements of the AlexNet model. e AlexNet model is trained on the training dataset which is used in this proposed system. And the results are computed according to the required parameters. e model is trained on different epoch values of 10, 20, and 30, respectively, in the proposed system.

Performance Evaluation Layer.
e pretrained AlexNet model is trained in the training phase, and performance is evaluated in the validation phase. e performance of the model is checked through performance metrics. e results produced by the proposed pretrained AlexNet model are examined by using different evaluation metrics. e 1920 images with a ratio of 80% are taken for training purposes, and the rest of 480 images with a ratio of 20% are taken for system validation.    Computational Intelligence and Neuroscience metrics act as a tool to evaluate classification models and are used in measuring the performance of the predictive model.

Results and Discussion
e developed proposed system model uses a pretrained AlexNet model for the detection and classification of malignant and benign tumors. Some changes are made in this pretrained AlexNet model according to the proposed system problem. And further, this proposed system model is divided into two layers: training and testing. e proposed system model is trained before and after that validate on separated testing data. As mentioned earlier, 80% of the dataset is used for training purposes and the rest of the 20% is used to validate the proposed model. e produced results of the proposed model are evaluated using performance evaluation metrics. For performance measurement, performance parameters are used to measure the performance of the proposed system model. e following are performance measuring metrics through which performance is measured: Accuracy, Miss Rate (MR), sensitivity, specificity, Output as Classified Image positive predictive values � TP TP + FN × 100%, false positive rate (FPR) � 1 − specificity, false negative rate (FNR) � 1 − sensitivity, likelihood ratio positive � sensitivity false positive rate × 100%, (9) likelihood ratio negative � false negative rate specificity × 100%.
(10) e proposed system model is applied in the validation phase and it classifies malignant and benign tumors into one of the classes. Table 2 represents simulation parameter values. e data is trained on multiple epochs like 10, 20, and 30, and maximum accuracy is gained through the proposed network model on 20 epochs. e training graph on epochs 20 where the system gains high accuracy is shown in Figure 2. Maximum accuracy is verified in the validation phase of all epochs, where the proposed model is validated on testing data. In Table 2 Figure 4. Table 2 represents the comparison of training and after that validation score on different epoch values, respectively, of 10, 20, and 30. Table 2 represents the score of different epoch values where the proposed network model achieved the highest score of 87.1% on an epoch value of 20. Figure 5 shows the labeled images of malignant and benign classes through the proposed system model. Total 8 images are given as input to model 4 from each class: proposed system model 5 of it in benign class while 3 in malignant class. Table 3 expresses the proposed system confusion matrix during the validation phase. Before this, the proposed system model is trained on 1920 images, where each class consists of 960 images. After that, the proposed system model is validated; during validation, 480 images were used, where each class consists of 240 images. For this purpose, a value of 20 epochs was set. From benign class, the proposed system model classifies 192 images as correct while 48 images are classified as incorrect. In the malignant class, the proposed system model classifies 226 images as correct while 14 images as incorrect.    (1)-(10). Multiple approaches have been used in the past for the detection of skin cancer, but transfer learning is the novel approach to detect and differentiate malignant and benign tumors. e proposed methodology achieved a high accuracy score in the detection of skin cancer disease. us, the proposed methodology helps medical consultants to identify disease and treatment for restraining the spread of disease. Table 5 shows the proposed system model with previously published approaches. It is observed that the proposed model gives 87.1% accuracy which is higher than the approaches published earlier.
e proposed system model DCNN, transfer learning intend with customized pretrained AlexNet model, achieved higher accuracy than existing published approaches.

Conclusions
e earlier work done for skin cancer disease detection was not accurate enough to classify tumors whether they belong to the benign or malignant family. An automated framework is required that can classify tumors as benign or malignant. e proposed system, based on the transfer learning classification model, is able to handle this problem. It detects and classifies the family of tumors accurately. e proposed system model used pretrained AlexNet, retrained CNN. e customized pretrained AlexNet model was validated on the validation dataset and achieved 87.1% accuracy on 20 epochs. e proposed system model does not require handcrafted features. It is very fast and easily manageable for large datasets too. In future work, well-known datasets of skin lesions like Ph2, MED-NODE, DermIS & DermQuest, ISIC 2017, ISIC 2018, ISIC 2019, and ISIC 2020 will be used in different architecture. e AlexNet model can be made more efficient and accurate by fine-tuning all the convolutional layers and improving malignant class accuracy. So, net accuracy can be increased. e rest of the pretrained network can also be explored.

Data Availability
e data used in this paper can be requested from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest regarding the publication of this work.