Melanoma Skin Cancer and Nevus Mole Classification using Intensity Value Estimation with Convolutional Neural Network

Melanoma skin cancer is one of the most dangerous and life-threatening cancer. Exposure to ultraviolet rays may damage the skin cell's DNA, which causes melanoma skin cancer. However, it is difficult to detect and classify melanoma and nevus mole at the immature stages. In this work, an automatic deep learning system is developed based on the intensity value estimation with a convolutional neural network model (CNN) to detect and classify melanoma and nevus mole more accurately. Since intensity levels are the most distinctive features for object or region of interest identification, the high-intensity pixel values are selected from the extracted lesion images. Incorporating those high-intensity features into the CNN improves the overall performance of the proposed model than the state-of-the-art methods for detecting melanoma skin cancer. To evaluate the system, we used 5-fold cross-validation. Experimental results show that a superior percentage of accuracy (92.58%), sensitivity (93.76%), specificity (91.56%), and precision (90.68%) are achieved.


Introduction
Skin covers the entire outside of our body and protects all of our internal body parts from environmental injuries. Nevertheless, because of its location, sometimes it suffers from different diseases that could often be life-threatening, and skin cancer is one of them [9]. There are three major types of skin cancer: Basal Cell Carcinoma (BCC), Squamous Cell Carcinoma (SCC), and Melanoma and Merkel Cell Carcinoma (MCC) [5]. Among all skin cancers, melanoma is the most dangerous and life-threatening one [32]. It grows rapidly and can spread to other parts of the body. According to [5], about 99,780 new melanomas will be diagnosed (about 57,180 in men and 42,600 in women), and 7,650 people are expected to die of melanoma (about 5,080 men and 2,570 women) skin cancer in 2022. World Health Organization (WHO) reports one out of every three malignancies is affected by skin cancer [40]. From 2009 to 2019 there has been about a 55 percent increase in current skin cases examined annually [39]. The lifetime risk of being affected by melanoma is about 2.6% (1 in 38) for whites, 0.1% (1 in 1,000) for Blacks, and 0.6% (1 in 167) for Hispanics [5]. Earlystage detection of melanoma skin cancer can be beneficial in curing it [12,37,11,3]. The early diagnosis survival rate of skin cancer is more than 90 percent [2].
Due to the complex nature of skin lesions, dermatologists relate many visual observations, such as symmetry of the lesion area, size, shape, color, and border to diagnose malignant melanoma [1]. Sign of the Ugly Duckling lesion is another warning of Melanoma [4]. There are also some popular scoring techniques to identify malignant melanoma, where a 7-point checklist [6], Menzies method, 3-point checklist, and ABCDE rules are the widely used method [4]. Out of which a common way of detecting melanoma skin cancer is the ABCDE rule: A for asymmetry (one half of the mole does not match the other), B for border irregularity, C for Non-uniform color, D for diameter greater than 6 mm or ¼ inch (about the size of a pencil eraser), and E for evolving size, shape or color. To assess moles' size, color, and texture, specialist doctors examine lesion areas in which Total Dermatoscopic Score (TDS) is estimated using (A, B, C, D, E) and some weight factors. They conclude the diagnosis result from the TDS value. If the TDS is above a threshold value, then they identify the lesion as a malignant one otherwise benign [29].
Since this detection procedure is time-consuming and needs specialist doctors to conclude [22]. There is a high possibility of being influenced by human subjectivity which makes it inconsistent in certain conditions. A computerized artificial intelligence-based system can easily detect and differentiate between melanoma and normal skin to eliminate this weakness. In recent times Deep Neural Networks (DNN) have been used in many different ways for medical imaging [17]. Convolutional Neural Network (CNN) is useful for image classification and recognition because of its capability to achieve high accuracy in a short time [43,42]. Compared to its predecessors, the main advantage of CNN is that it detects the important features automatically without any human supervision [27]. In this work, an intelligent system is developed to predict melanoma and nevus mole at an early stage, considering the complicated is-sue. Our innovative approach uses pre-processing steps, an intensity value estimation (IVE) model, and a CNN model.
To train and test the model, we used five-fold cross-validation. The proposed model is evaluated using five well-known quantitative metrics: sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and accuracy. Considering the issues, the major contributions through this work can be enlisted as follows: • To develop an Intensity Value Estimation (IVE) model. • To present an efficient image resizing technique to keep the lesion shape, minimizing the possible data loss. • To design the proposed methodology by combining the resizing technique, IVE model, and Convolutional Neural Network (IVEwCNN) for automatic classification and detection of Melanoma skin cancer and Nevus mole. • A comparative histogram analysis is performed between our newly developed method and other state-of-the-art methods to evaluate the effectiveness of our newly developed model.
The rest of the paper is organized as follows: The related literature review is discussed in section 2. The proposed methodology is categorized into subsections and briefly discussed in section 3. Section 3.2 describes the high intense pixel value estimation and acquisition process. The experimental analysis is discussed in section 5. Image acquisition and MED-NODE dataset descriptions are stated in section 4. In section 5.2 performance evaluation metrics and experimental results are discussed concerning different methods and the MED-NODE dataset. Finally, the conclusion is discussed in section 7.

Background Study
Authors in [14] worked with the MED-NODE dataset. To segment regions of interest in healthy and lesioned areas, they used k-means clustering (k = 2). Before segmentation, a series of pre-processing steps are done to handle noise and illumination effectively. They utilized Gaussian smoothing (σ = 5) and Kuwahara smoothing filters to remove noise and additional noisy features preserving edges. After removing noise, they mapped each image into 50 sub-image of pixel size (15 × 15). A clusterbased adaptive metric classifier was developed to extract 675 features per image. The training feature vector size was 2250 (50 × 45), and the evaluated feature vector size was 6250 (50 × 125). The model was good, but the dataset's size was one of its main limitations.
A deep neural model in which the authors considered reducing illumination and noise effect in the pre-processing step was proposed in [31]; then fed the enhanced images into a pre-trained CNN model. Hence, the dataset has limited images, so they used cropping and rotation to expand the training data. They produced a segmentation mask by applying the k-means classifier (k = 2) to the pre-processed image. The mask was enhanced by applying morphological operations. Based on the information of the segmentation mask, a Gaussian filter was used on the standard skin parts. In their CNN model, 20 feature maps were generated in the first convolution layer, and 50 were generated in the second convolution layer. After each convolution layer, the pooling layer and a 2-layer fully connected stage were utilized. Finally, the diagnosis results were found from this 2-layer network with a linear transfer function. Training data is fed to the network using batch size 64. They randomly split the dataset into 20% testing and 80% training data with no overlapping. To train the model, they performed 20,000 iterations. They addressed that the Illumination correction increases their system's discrimination capability, which helped increase system accuracy.
A combined model was developed by the authors in [39] using multi-level segmentation, CNN, support vector machine (SVM), and back-propagation neural network that combined Otsu, Modified Otsu, and watershed segmentation methods for segmentation. Finally, CNN and SVM were used for training and classification, respectively. Another authors in [28] used MED-NODE and the international skin imaging collaboration (ISIC) dataset together with 2,170 images for their classification model. To avoid noise and common lighting problems, they used a few pre-processing steps to improve image texture and darken the perimeter of the lesion. They utilized Contrast enhancement and an anisotropic diffusion filter to correct the image contrast and remove noise and preserve lesion edges. Then, the shape features method and Principle Component Analysis (PCA) were used to extract features and reduce features dimension. Convolution Deep Neural Network (CDNN) was used where dropout is set 0.5 to avoid overfitting, learning rate tested 0.1 to 0.001, and discovered minor variation was working well, tested on different batch size but got 32 and 64 which works well in many situations. Their proposed system achieved 96.8% accuracy with a few noticeable epochs in 0.41 min.
Another skin cancer detection technique was introduced in [13] utilizing the wellknown HAM-10000 dataset. In pre-processing steps, they removed noise, reduced image resolution, and applied image augmentation to avoid overfitting to increase the learnability of the system. The system produced several copies of existing images by various factors by applying translation, rotation, and zooming on images. For the classification task, they used CNN, the Transfer Learning method, with other classification algorithms such as XGBoost, SVM, and Random Forest Algorithms to classify and compare analysis. Finally, they yielded an accuracy of 90.51% in the ResNet model's transfer learning approach. The author's used the MED-NODE dataset [30]. In the pre-processing step, Otsu's segmentation method is used on the grayscale image to segment the lesion part from the image. A total of 1900 features are extracted from each segmented lesion image. Twenty-five features are excluded from 1900 features as they are either too high or too low, or constant across the dataset. With the different types of training and cost functions available in a multi-layer neural network (MLP), this feature set is tested by various neurons. The relief method selects rank-wise best features among all 1,875 features. Using the features found from principal component analysis (PCA) of the extracted 1,875 features, Neural network (MLP), Linear SVM, Medium KNN, and Linear Discriminant are classifiers. Their work MLP with PCA feature only (used 25 features) shows 87.18% accuracy. Authors [44] addressed the effect of contrast-enhancing, the image texture analysis, and considering pixel intensity values in an image classification model. They found that contrast-enhancing is designed to increase the discrimination between intensity values of an image. So, they can be easily identified by human and computer vision. The primary pieces of information are stored in the intensity value of a pixel. It can be a single value for a gray-level image or three values for a color image. They also addressed that image texture analysis could be an essential factor for pattern recognition due to the power of discrimination ability.
Noises were reduced from skin lesions using a Gaussian filter then applied an Improved K-means clustering-based segmentation [7]. The authors [7] extracted three different features using Local Binary Pattern (LBP), Grey Level Co-occurrence Matrix (GLCM), and RGB color channel features from the ROI of skin lesions. Using the extracted textural and color features from the lesion a distinctive hybrid super feature vector was created. For classification, they used a support vector machine (SVM), Knearest neighbor (KNN), Naïve Bayes (NB), and Decision Tree (DT). The DERMIS dataset (146 are melanoma and 251 are nevus) was used in the experiment. The texture features, GLCM, and LBP features were merged with the color features to acquire a high classification accuracy.

Proposed Methodology
The general process of detecting and diagnosing melanoma skin cancer has been summarized into key operating procedures such as image pre-processing, image segmentation, feature extraction, and analysis, and classification of lesions images [26,38] as described in Fig  Our proposed methodology is divided into pre-processing, intensity value estimation, and convolutional neural network (CNN) steps. A few sub-parts in the preprocessing step to reduce artifacts that could mislead the CNN model. The proposed methodology is described by the block diagram shown in Fig. 2.

Pre-processing
In the pre-processing stage, images from the collected MED-NODE dataset [14] are passed through a series of basic image processing methods to reduce the effects of misleading factors on the CNN model. As images contain both the healthy skin and lesion parts, we corrected brightness (B), sharpness (S), and contrast (C) to enhance the images' lesion part to process further. In this experiment, a python "ImageEnhance" class is used from the "pillow" module to correct the BSC. The general intensity of the pixels refers to brightness in an image and the histogram of an image gives a clearer indication of the brightness. The higher end in the histogram indicates a brighter image and the image is darker when the histogram is confined to a small portion towards the lower end [19]. The number of details present in an image refers to its sharpness. Lossy compression, motion blur, de-noising, and out-of-focus filtering are some of the causes that affect perceived image sharpness [19]. In general, contrast refers to split-up the dark and bright regions in an image [8]. The contrast enhancement technique eliminates the anomaly that would otherwise occur between different regions in an image.
An RGB image contains a three-channel red (R), green (G), and blue (B), whereas the grayscale image contains only one channel. The three-channel in an RGB image contains different intensity levels to represent that image in a color form. For var-ious image processing tasks such as morphological operation segmentation, using a grayscale image is more accessible than an RGB image because it has only one channel. So, we converted the images from RGB to grayscale images. The grayscale pixel value is calculated as the weighted sum of the corresponding R (red), G (green), and B (blue) pixels as in the equation 1 to convert an RGB channel image into a single grayscale channel image. Cathode-ray Tubes (CRT) phosphors use these weights to represent better the human perception of RGB than equal weights [33]. The texture in an image offers information about the spatial ordering of color or intensities in an image, or selected region of an image [41]. Since the grayscale image is formed from the three-channel RGB image using equation 1, the image color and texture could be represented by the different levels of pixel intensity in the grayscale image [23,10].
Though high-resolution professional cameras take images, non-uniform lights create noise effects. We used the Gaussian filter to remove noise from grayscale lesion images (σ = 1.35). The healthy skin part of the images is irrelevant to our model. So, before feeding the images into the CNN model, we segmented the lesion part from the healthy skin part using Otsu segmentation. ii. hcU p ← hcU p + 1 As the use of a conventional resizing algorithm on the grayscale image directly would distort the skin session shape [35]. So for convenience, keeping all the lesion shapes the same as the origin, we resized all The segmented masks (SM) and Gaussian filtered images (GFI) into a unique size (N r × N c ) (where N r = 256 and N c = 256) using Algorithm 1. We applied a binary opening on the resized mask images to remove hair, small objects, and unnecessary things to enhance the lesion area. The segmented mask is used to segment the lesion area (SLA) from the image following equation 2 where "r" and "c" represents spatial (plane) coordinates of a 2D image, and the amplitude (r, c) is called the intensity or gray level at the point for that function.
SLA r,c = GF I r,c * SM r,c where, (r, c) = 1, 2, · · · , (N c , N r ) Data augmentation is a strategy that significantly increases the diversity and amount of data from available data to train a model without collecting new data. Cropping, Padding, Flipping, Zooming, and Varying the image size are the techniques that are used to augment the data. In this work, we used zoom in, zoom out, flipping, random contrast, random brightness, and rotation techniques to expand the data [34,24]. Before feeding the images into the proposed CNN model, the proposed IVE model is applied to take high intense pixel values from segmented lesion images. The model is divided into two sub-steps: edge detection and high intense pixel value estimation and acquisition. For edge detection, we used Canny Edge detection. The Canny Edge detection first eliminates the image noise by smoothing it and then finds the image gradient to highlight regions with high-spatial derivatives [20]. In the Canny Edge detection, to avoid losing precision while converting the image pixel values to unsigned 8-bit, we multiplied the segmented lesion image by 255. After data augmentation, the resized segmented lesion images are fed into the IVE model. The IVE model outputs a high intense pixel value stated in Fig. (3g) and Fig. (3h).

Intensity Value Estimation
The intensity value estimation (IVE) model is one of the significant contributions of the work, as intensity levels act as one of the most distinctive features for object or region of interest identification [25]. In the IVE model, a multiplication between every pixel of the segmented lesion image and a constant value is performed using equation 3. Here, f is a 2D light intensity function, and (x, y) denotes the spatial coordinates of the image. Then the normalization on the calculated image is used to distribute the intensity of the lesion region pixels using equation 4. The normalization process converts the gray-level intensity of the image by the range of 0 to 255 Fig.  (3e) and Fig. (3f). The histogram shows the pixel value between 0 and 255, whereas the edge detection of segmented lesion image histogram shows the pixel intensity in 0 or 255 Fig. (3c) and Fig. (3d). So, there are no intensity values between 0 and 255 in the edge detection image, which cuts off a few features from the image. Here, our proposed IVE model helps retain the lesion image's different intensity levels. These varieties of the intensity level of lesion images contain more information (color and texture) in the intensity level form than normal edge detection techniques.  Table 2 shows the experimental result of our proposed model using Canny Edge detection. Since the improvement of the effect is not significant, we resolved the model to distribute the gray-level intensity of the image using equation 4. It is observed that this modification can select the pixel values in the segmented lesion images that are greater or equal to a threshold value equation 5.
f (x, y) = f (x, y) × Constant, f or every x, y f (x, y) = normalize(f (x, y)) (4) Using the proposed high-intensity value estimation model produced more features in different intensity levels than the only edge detection of the segmented lesion Fig.  (3g) and Fig. (3h). The model extracts the color and texture features in the form of the different intensity levels of the pigmentary lesion. In this aspect, choosing intense high pixels helps our model to differentiate Melanoma cells from Nevus cells. This decision experiment is depicted in Fig. 3.

Convolutional Neural Network
It is proved that a simple artificial neural network (ANN) fails at a certain point, especially an over-fitting may arise due to the size of the image [15]. So, CNN has tremendous advantages over ANN in image classification problems. CNN is a class of deep neural networks that makes a massive breakthrough in image classification, recognition, object detection, face recognition, and many more [18]. CNN helps to auto detect important features and extract features from the images, which may be helpful in the image classification task [34]. It extracts features from images using filters and reduces the number of learnable parameters using the pooling technique. The CNN model comprises five stages of neural layers in its structure: the input layers, convolutional layer (Convo + ReLu), pooling layer, fully connected layer, and output layer. The proposed CNN model workflow is depicted in Fig. 4. CNN model accepts the input as a 3-dimensional matrix (W idth × Height × Dimension) to the input layer. Dimension defines the number of channels contains in that image. Dimension for a grayscale image is 1, and for RGB, it is 3. The first layer of the CNN model is the input layer, where the input image with size 256 × 256 × 1 is given. Then input image is passed to the convolutional layer, where filters are applied to the original images. The filters are slid over the receptive fields of the same input image by a stride and continue through the whole image. The convolutional layer uses the ReLu activation function to zero all negative values. A pooling layer is used after each convolutional layer to reduce the spatial volume of the input image. The fully connected layer takes the output from the previous layer and flattens them to convert inputs into a single vector. This layer involves weights, biases, neurons, and activation functions and is responsible for updating weights in the training session. Here, we used the ReLu activation function to produce output from each layer. The output layer is the final layer that uses the Softmax activation function to estimate Melanoma skin cancer and Nevus mole probability.

Dataset
The proposed system is evaluated on a publicly available standard MED-NODE melanoma dataset, which contains high-resolution skin lesion images [14]. MED-NODE dataset is the subset of digital image archives of 50,000 images collected by the Department of Dermatology of the University Medical Center Groningen (UMCG). All of these pictures have been examined and assessed by a dermatologist as being of the highest caliber [14]. These photographs were captured in JPEG format with a Nikkor lens on a Nikon D3 and Nikon D1x camera from a distance of around 33 cm from the skin lesion area. Fig. 5 and 6 display some of the images from the MED-NODE dataset. The soundness of the dataset has been ensured by considering the following criteria [14].
• MED-NODE dataset (170 images) is created by randomly chosen images and the relevant patient instances could not possibly be identified. • Superficial spreading melanoma and nevi are included in the dataset.
• Each picture originated from a different patient (Aside from the image, which shows how the disease significantly differs in various bodily areas). • Each picture is sharp and properly exposed to annotate correctly.
• Each picture has represented the group it belongs to.

Experimental Analysis
Some of the dataset image resolutions are above (N r × N c ) (where N r = 256 and N c = 256), which needs a high cost of computing power. Since the rescaled lesion images would be better for deep neural networks [35], we used pre-processing steps to resize the images into (N r × N c ) and remove unwanted artifacts. As the low amount Figure 6. Nevus Mole Images of data could mislead and overfit the deep neural network model, the augmentation technique is applied to increase the amount of data and the diversity of the data [36] to reduce the data misleading and overfitting. Then the IVE model is applied to acquire high intense pixel values from every segmented lesion image, which allows for keeping important information about Melanoma and Nevus mole features. Feeding the significant feature value to CNN achieves a better result.
Authors [16] discovered that for the training/validation set, the number of available adjustable parameters for the dataset should be inversely proportional to the square of the significant portion of patterns. As a result, the 80/20 split was chosen to avoid overtraining the deep neural network. Most of the state-of-the-art methods [21,29,14,31] that use the same or smaller dataset used 80% data for training and 20% data for testing purposes. In the experiment, the data augmentation technique is used to enhance the dataset. After the data augmentation, 80% images are employed to train the algorithm, and the rest 20% are used for validation and testing purposes. To avoid biased performance results we chose average results from the 5-fold cross-validation on our proposed model.

Training and Testing
At the beginning of our system, it starts to train our model with 80% train images, and the rest 20% is used for testing purposes. Our system split the dataset such that no overlapping occurs in the train and test data set. We set 40 as the number of epochs to train our model. For optimization purposes, we used Adam Optimization and Sparse Categorical Cross entropy loss to calculate the loss of the CNN model. We implemented our model in the google cloud platform using Colab Notebook, which provides a 12 GB NVIDIA Tesla K80 GPU that can be used for up to 12 hours continuously and is also highly integrated with Google Drive. It also offered TPU recently for free. The full CNN model is depicted in Table 1. The proposed CNN architecture is comparable with the other well-known DNN models that are implemented for skin cancer detection. To achieve the best experimental results DNN model must have the minimum number of these proposed layers with the IVE model in the processed image.

Performance Evaluation
The proposed IVE model was used to estimate the high-intensity pixel values from the training dataset, which are incorporated into our developed CNN model to detect and classify melanoma skin cancer and nevus mole. Table 2 shows the 5-fold cross-validation experimental results of our proposed model using Canny Edge detection and Table 3 shows the 5-fold cross-validation experimental results of our proposed model using intensity value estimation with CNN (IVEwCNN). It is demonstrated that pixel intensity levels serve as one of the distinguishing features for identifying an object or region of interest, particularly when considering skin cancer. Textural features are regularly used in image classification because they enhance the classification of nevus and melanoma by computing the irregularity of their structure [25]. Since choosing the high-intense pixels gives more information, the model can easily differentiate Melanoma cells from Nevus cells more preciously. Therefore the proposed model shows a better result when compared with others.
From Table 2 and Table 3, we can see that our proposed (IVEwCNN) model performs significantly better in terms of every described performance evaluation metric than the proposed model with Canny Edge detection. We used the same threshold  value for all the performance evaluation metrics in this experiment. For experimental evaluation of the algorithm, the proposed model was compared with some existing works described in [14,31,29,21,30] as they all worked with the same or smaller dataset and evaluated their system performance. For performance measurement, the proposed model was evaluated on five commonly employed metrics (sensitivity, specificity, PPV, NPV, and accuracy) that are widely used in classification problems. The performance evaluation metrics considered in this work can be defined as below:  The proposed IVE model performance and the Canny Edge detection technique performances are compared with other state-of-the-art methods that were evaluated on the same or smaller dataset described in Table 4. The values in Table 4 are updated to two decimal points to compare with other state-of-the-art methods. In Table 4 the results in bold format show the experimental results. Our proposed methodology (IVEwCNN) shows better performance evaluation metrics. We can conclude that the effective use of the CNN model with a well-processed image generates a superior result when we use high intense pixel values from the segmented lesion skin image.

Discussion
Instead of conventional visual observations, an efficient expert system is developed to assist expert physicians in the early-stage detection and classification of Melanoma skin cancer. The proposed IVEwCNN model adopts the new intensity value estimation (IVE) technique in which the high intense pixel values are calculated from each segmented lesion image after rescaling the image. Most of the work is done by conducting lesion segmentation and detecting the edges of the segmented lesion, which is then fed into a deep neural network. This contrast enhancement and texture analysis increase the discrimination between the intensity of values of an image that improves the overall performance [44]. Our proposed method performs this more precisely and accurately using three different stages. Firstly, in preprocessing step, a new image is generated consisting of a shape of (N r × N c ) where the lower dimension of segmented image pixels are mapped to retain the original lesion shape. Keeping the lesion shape the same helps retain information about the lesion area, size, and border. Then the IVE model is applied as shown in Fig. 7 and Fig. 8 to compute the high-intensity pixels that store descriptive features on object or region of interest identification [25]. The proposed model (IVEwCNN) shows a significant difference between the outcome of Canny Edge detection and existing works. Table 2 depicts the best outcome of Canny Edge detection with CNN is 0.75 for sensitivity at Fold-2, 0.842 for specificity at Fold-3 and Fold-5, 0.786 for PPV at Fold-5, 0.765 for NPV at Fold-2, and 0.771 for accuracy at Fold-5. The result of existing works is shown in Table 4 where the best result was achieved 0.8744 for sensitivity [30], 0.89 for specificity [21], 0.8674 for PPV [21], 0.86 for NPV [31] and 0.8718 for Accuracy [30]. Whereas our proposed model exhibits the average outcome of IVEwCNN is 0.936 for sensitivity, 0.9156 for specificity, 0.9068 for PPV, 0.9488 for NPV, and 0.9258 for accuracy, as shown in Table 3 which outperforms the conventional edge detection based techniques.

Conclusion
This paper presented intensity value estimation with a convolutional neural network (IVEwCNN) based algorithm for detection and classification. The method led the system to achieve high accuracy, sensitivity, specificity, precision, and NPV to detect and classify melanoma skin cancer and nevus mole. As well, pre-processed images increase the learnability of any system. Here, we chose to take the pixels with higher intensity than a threshold value from the segmented lesion image instead of edge detection. The technique preserves more features than only edge detection. So, this helps our system to increase learnability; hence this predicts melanoma, skin cancer, and nevus mole more accurately. Our proposed system takes 39 (average) seconds to detect and predict melanoma skin cancer and nevus mole. Finally, to evaluate the proposed system performance, we considered the five most popular performance evaluation metrics and compared them with some notable existing works on the same or smaller dataset. Due to machine limitations, large datasets were not considered in this experiment to evaluate the proposed IVE model. Hence, the proposed model's performance is only evaluated by comparing it to the state-of-the-art models that used the same or smaller dataset for their model. The experimental comparison exhibits that the proposed algorithm shows better results than all the state-of-the-art models. The proposed automatic deep learning system can be implemented in dermatological diagnosis to aid doctors in early melanoma detection. Before going for a clinical application, our proposed system needs to train the model with an improved large dataset. Future work could include feature selection, feature dimension reduction, and optimizing the CNN model to increase efficiency and decrease model training time.