Malevolent Melanoma diagnosis using Deep Convolution Neural Network


Karthiga M1, Priyadarshini R K2, Bazila Banu A3

Dept. of Computer Science and Engineering, Bannari Amman Institute of Technology,

Sathyamangalam, Tamilnadu, India

*Corresponding Author E-mail:



Computer based analysis has become a most important part in medical industry nowadays. Skin cancer has become a most dreadful disorders and it is can be diagnosed using computer based technique. Dermoscopy images can be used for training the classifier for correct prediction of melanoma. A novel methodology based on deep convolution neural network is utilized for absolute diagnosis of malevolent melanoma. Transfer learning technique is employed along with deep convolution neural network based Inception v3 framework. The outcomes are obtained by utilizing the proposed methodology with a total of 2700 dermoscopic images. Maximum rate of accuracy, sensitivity and specificity are obtained from the proposed implementation. The proposed results outperform the results for classification of skin lesions by dermatologists.


KEYWORDS: Deep Convolution Neural Network; Transfer Learning; Inception v3; melanoma; squamous carcinoma




Cancer among people is increasing day by day due to the modern life style activities. Radiation also plays an important role in escalating the disease rate. Due to amplified exposure of Ultra violet rays there has been a incredible increase of about 53% in skin cancer from 2008 to 2019 [1,2]. Skin cancer occurs due to strange inflammation in the skin. It is one of the malevolent forms of cancer. Apart from unusual activities of human, ultraviolet radiations from sun also affects the DNA of skin. Affected DNA undergoes mutations in the cell and figure out tumors which in turn becomes malignant when not diagnosed earlier. Genetic disorders may also lead to skin disorders [13]. There are different kinds of cancer namely, Melanoma, Actinic Keratoses (AK), Basal Carcinoma (BC) and Squamous cell carcinoma (SCC).


Cancer should be diagnosed at an earlier stage otherwise spreading of cancer to various cells and organs may occur. Among the different types of cancer, melanoma is highly dangerous since it spreads to diverse tissues. Fast diagnosis of melanoma will increase the possibility of survival of the patients. But diagnosing melanoma earlier is highly crucial as the survival rate for 5 years would be 99% on early detection and 14% on later detection [3]. The first step in diagnosis is the visual inspection by dermatologists. Due to similarities of some types of skin lesions accurate diagnosis is important which could be achieved by experienced professionals [4]. Dermoscopy involves capturing high resolution images with an inflatable camera to recognize skin lesions and this kind of diagnosis is used in distrustful cases. During dermoscopy, reflections on the skin are reduced by diminishing the lighting thereby visualizing the skin parts deeper. This methodology could improve the accuracy rate to 49% [5]. Accuracy rate of diagnosing melanoma will be enhanced to 74% to 84 % by utilizing the combination of visual inspection and dermoscopy [6, 7]. However there is a shortage of dermatologists across the world. Deep learning based dermoscopy image analysis and classification of diverse kinds of skin lesions is used to solve the above problem. With the advancement of Artificial Intelligence, Deep Learning Techniques and collection of huge amount of open source datasets (dermoscopic images), classification of melanoma with acute accuracy rate is possible nowadays.


Feature extraction is an important part in classification. Various features can be considered for extraction among them color, geometric features, texture features, dermal features, ABCD rule features and contour features are some of the categories. Some constraints like border irregularity, diameter variation and color variation are resolved by ABCD rule features. Sensitivity and specificity can be used to estimate the clinical tests. Patients with disease are appropriately recognized from the clinical tests by sensitivity whereas specificity from the clinical tests appropriately recognizes the patients without disease as illustrated in the below equations 1, 2.






true positive      = count of appropriately diagnosed     malignant  skin lesions

true negative     = count of appropriately diagnosed

                               benign skin lesions

positive              = count of given malignant skin lesions

negative             = count of given benign skin lesions


In this paper, two major problems in automatic diagnosis of skin melanoma are resolved. One is skin melanoma recognition problem and the other is correct judgment of melanoma. Transfer learning with deep convolution neural network based on Google’s Inception v3 framework is utilized for              absolute prediction of skin melanoma. The dataset is collected from International Skin Imaging Collaboration (ISIC): Mellanoma Project.



Automated screening of melanoma is done using deep learning technique which simulates transfer learning. Image Net framework is used to train the datasets which has good quality features to classify the lesions [8]. Skin mole imaging is another simultaneous technique which has encountered significant progressions because of progress of imaging sensors and preparing power. In any case, these plans use hand-created highlights which are hard to tune and perform ineffectively on new cases because of absence of speculation control. In this investigation trained deep neural network is used to naturally remove a lot of agent and to analyze an example of skin sore. The exploratory tests did on a clinical dataset demonstrate that the execution utilizing DNN-based highlights performs superior to the best in class procedures [9].This work exhibits a methodology for the diagnosis of melanoma from the images captured from dermoscope which integrates deep learning, support vector machine (SVM) learning  and sparse coding.


One of the helpful parts of the proposed methodology is that unsupervised learning inside the area, and highlight exchange from the space of normal photos, dispenses with the need of clarified information in the objective assignment to adapt great highlights. The connected component exchange enables the framework to compare perceptions and perceptions in the real world to portray skin injury patterns [10].  Deep convolution neural networks are used to classify the skin lesions on a pixel to pixel manner.  The most prevalent cancers are determined from the binary classification of benign seborrheic keratoses and keratinocyte carcinomas.


Malignant melanomas are identified from the end to end training approach to prevent the deadliest disease [11]. A deep learning algorithm is employed to classify the types of cutaneous tumors. Twelve diseases are considered in the training phase. Microsoft ResNet-152 model is adopted to train and test the Asan dataset that contains skin lesion images. The results are improved by adding age and ethnics as additional features [12]. Deep residual networks are used to train the model to automatically analyze the skin lesions using a large dataset of dermoscopic images. The ResDNN exploited the hidden features such as different size and shapes of the lesions. It also considered the hair and skin colors for melanoma analysis.


The CNN was composed of multiple elements with in which every half considers an equivalent image at a distinct resolution. Next, Associate in Nursing finish layer combines the outputs from multiple resolutions into one layer. The CNN identifies interactions across totally different image resolutions and also the weight parameters square measure is optimized by end-to-end learning [13].


An image with different resolution is provided to the CNN to work in different parts during training. An end-to-end learning approach is adopted to optimize the image that has varied resolutions. Dermofit image library is utilized for this approach and it attained a classification accuracy of 79.5% [14]. Two CNN models, namely, CaffeNet and VGGNet are adopted to classify images in the DermQuest dataset that contained around 6500 images. The training classes of the architecture involved finely defined features. The parameters are fined tuned by adjusting the weight parameters and it attained only 50.275 of accuracy [15].

The major challenge in melanoma diagnosis is that the public datasets do not contain the entire population of the world. It has only skin images of light skinned people such as Australians, Europeans and Americans. The dataset should also contain important features such as skin type, anatomic location, race, age and gender. To perform diagnosis of dark skinned people, CNN should be trained with dark skin images from clinical dataset.[16] [4]



In the proposed model Deep Convolution neural network model called Inception v3 is used with different dense layers to train the datasets. This deep convolution neural inception v3 network model provides high precision accuracy in determining the skin lesions. The gain of transfer learning is used. Training the convolution neural network (CNN) from the beginning or pre-trained model of CNN can also be utilized in the training model.


Fig.1: CNN with Inception v3 model


CNN can be used along with transfer learning depending upon the problem where the changes are made only in the last layer of CNN whereas other layers are kept as it is as depicted in fig 1. This combined technique is used in most of the medical applications where the number of training data is less [18]. This combined model yields better performance when compared to learning using CNN alone [19][20].


Nearly 1 million pre-trained images are available in the dataset of Google’s Inception v3+CNN framework [21]. Inception algorithm is a proficient deep neural network architecture with a broad area of application in complex systems. A new layer of organization with more depth is added in deep neural network with inception module [22]. Non-linear functions cannot be determined by Conventional neural networks as it uses linear functions. A lot of research is made to make conventional neural network work complex and to overcome the over-fitting problem [23]. Taking advantage of this new methodology, the first model of Inception framework was developed. Inception v1 framework aims in optimizing the CNN by utilizing the existing components [22]. Further versions of Inception framework were developed with better results than the existing. By combining the lingering connection version 4 in Inception framework is developed which improves the training process by cutting down the computational complexity [24].


The data set used in our proposed method is collected from International Skin Imaging Collaboration (ISIC): Mellanoma Project. Totally 1200 Benign images and 800 malignant images are taken. The sample images in the dataset are depicted in below figure 2.


In ISIC dataset, all images are labeled with the type of the disease and unlabeled images are not considered for learning. The collected images are separated into different folders on the basis of diagnosis. The folders are structured as recommended by different dermatologists based on the similarity when viewed normally. The tree structure is used to arrange the folders; root nodes denote the benign, neoplastic, non-neoplastic and malignant skin lesions. Individual disorders are represented in child nodes. A total of 2000 nodes are used in the proposed method. This structure is then used to separate into training classes based on the visual similarity. The neural network would be fed by the image that has lesions in the skin and then training the skin label is made.  757 images labeled as output is used as training class to make the absolute prediction.


Fig.2: Sample images from the dataset


The highest probability is achieved with these 757 training class labels. Not less than 200 images are made to be present in each training class. If a grouped class contains less than 200 images, then it is grouped with some other classes close to it. The training class is grouped in such a way that CNN could learn efficiently and it won’t suffer from too small training classes.  The test data set and validation data set contains randomly chosen images. Validation data set contains not more than 10% of data. The images that are not clear are eliminated. The best quality images that are correctly diagnosed using biopsy are selected for test data set.


The skin lesion dataset was retrained to the last layer of Inception version 3 network. The model also utilizes transfer learning methodology because of the sparse medical data. The accuracy of the model is determined by performing a 3-way classification and it completely relies on the first stage of the tree structure. If an image is present in both training and testing data set, cleaning is performed by placing yellow markers in the image.


The skin lesions are classified into 3-way classification as represented in the below table 1.



1.                   Benevolent/Benign lesions

2.                   Malevolent/Malignant lesions

3.                   Non-neoplastic lesions



The threshold value of the neural networks has to be chosen with more care since it leads to the correct prediction of melanoma. The threshold values should lie between 0 and 1 for determining the absolute sign of melanoma. If the threshold value is chosen as 0.2 signs of melanoma are predicted definitely and the image is sent for further tests. In case of choosing a value as 0.5, there may be a chance of missing the prediction of cancer or a healthy person may be considered under diagnosis. If the threshold value is chosen as 0.8 there may be a chance of missing a cancer patient. So in general from the observations, it is found that,


·       Choosing a high threshold value will result in missing a person who has cancer and later it results in death

·       Choosing an intermediate values will result in equal chance of predicting the person with cancer or without cancer

·       Choosing a lower value will definitively predict the person who has cancer and will be sent for more tests


The observation results are represented in the below figure 3. Sensitivity and specificity are determined for various thresholds and confusion matrix is plotted depending upon the true and false positive rates. ROC (Relative Operative Characteristics) curve is created using the sensitivity and specificity values. For testing, clinical data is fed to the CNN as an input and CNN provides the result as malignant or non-malignant. This method is used as an initial process by dermatologists to choose whether a biopsy diagnosis is required further or not. Malignant cancer is determined by gathering the probabilities of classes with malignant images. The labeling is provided to the images if their score is more than 50%. The ROC curve is plotted for each threshold values ranging between 0 and 1. The confusion matrix is formed using the true positive and false positive rates and it is represented in below figure 4.


Fig.3: Observation on setting threshold value for classification


Fig.4: Confusion matrix for determining the malignant score


The ROC curvature is drawn for true positive and false positive rates and resultant curve area is 0.8 which is more or less equal to 1. If any images go beyond the threshold range then it is considered as malignant and sent for more tests for exact diagnosis. If the results fall within the threshold level then it is considered as benign stage. The plotted ROC curve and the results obtained for each category is shown in below figure 5.


Fig.5: ROC curve for the CNN Inception v3 framework



This paper has deliberated about the classification of skin melanoma using deep neural network based Inception v3 framework with transfer learning. Four different kinds of cancer, images are extracted from the dataset and classified using deep neural networks. More than 2700 training images are used and the highest probability is achieved with 757 training class labels. Specificity and sensitivity is calculated using the true positive and true negative rates. A threshold value is set using the confusion matrix. ROC curve is plotted based on the threshold values and the resultant curve area is 0.8. Thus the accuracy obtained from the proposed methodology outperforms the results of the classification of the skin melanoma by dermatologists.



1.       Nami N, Giannini E, Burroni M, Fimiani M, Rubegni P. Teledermatology: state-of-the-art and future perspectives. Expert Review of Dermatology. 2012 1;7(1):1-3.

2.      Fabbrocini G, Triassi M, Mauriello MC, Torre G, Annunziata MC, De Vita V, Pastore F, D’Arco V, Monfrecola G. Epidemiology of skin cancer: role of some environmental factors. Cancers. 2010;2(4):1980-1989.

3.      Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S. Dermatologist-level classification of skin cancer with deep neural networks. Nature. 2017;542(7639):115.

4.      Ali AR, Deserno TM. A systematic review of automated melanoma detection in dermatoscopic images and its ground truth data. InMedical Imaging 2012: Image Perception, Observer Performance, and Technology Assessment 2012 ; 8318 - 83181I)

5.      Kittler H, Pehamberger H, Wolff K, Binder M. Diagnostic accuracy of dermoscopy. The lancet oncology. 20020;3(3):159-65.

6.      Ali AR, Deserno TM. A systematic review of automated melanoma detection in dermatoscopic images and its ground truth data. InMedical Imaging 2012: Image Perception, Observer Performance, and Technology Assessment 2012 ; 8318 -  83181.

7.      Fabbrocini G, De Vita V, Pastore F, D'Arco V, Mazzella C, Annunziata MC, Cacciapuoti S, Mauriello MC, Monfrecola A. Teledermatology: from prevention to diagnosis of nonmelanoma and melanoma skin cancer. International journal of telemedicine and applications. 2011

8.      Menegola A, Fornaciali M, Pires R, Bittencourt FV, Avila S, Valle E. Knowledge transfer for melanoma screening with deep learning. In2017 IEEE 14th International Symposium on Biomedical Imaging (ISBI 2017) 2017 ; 18: 297-300.

9.      Pomponiu V, Nejati H, Cheung NM. Deepmole: Deep neural networks for skin mole lesion classification. In2016 IEEE International Conference on Image Processing (ICIP) 2016 ;25: 2623-2627.

10.   Codella N, Cai J, Abedini M, Garnavi R, Halpern A, Smith JR. Deep learning, sparse coding, and SVM for melanoma recognition in dermoscopy images. InInternational workshop on machine learning in medical imaging 2015 Oct 5 (pp. 118-126). Springer, Cham.

11.   Kawahara J, BenTaieb A, Hamarneh G. Deep features to classify skin lesions. In2016 IEEE 13th International Symposium on Biomedical Imaging (ISBI) 2016 : 1397-1400.

12.   Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S. Dermatologist-level classification of skin cancer with deep neural networks. Nature. 2017; 542(7639):115.

13.   Han SS, Kim MS, Lim W, Park GH, Park I, Chang SE. Classification of the clinical images for benign and malignant cutaneous tumors using a deep learning algorithm. Journal of Investigative Dermatology. 2018 1;138(7):1529-38.

14.   Bi L, Kim J, Ahn E, Feng D. Automatic skin lesion analysis using large-scale dermoscopy images and deep residual networks. arXiv preprint arXiv:1703.04197. 2017 :1-2.

15.   Kawahara J, Hamarneh G. Multi-resolution-tract CNN with hybrid pretrained and skin-lesion trained layers. InInternational Workshop on Machine Learning in Medical Imaging 2016 : 164-171.

16.   Navarrete-Dechent C, Dusza SW, Liopyris K, Marghoob AA, Halpern AC, Marchetti MA. Automated dermatological diagnosis: hype or reality?. The Journal of investigative dermatology. 2018;138(10):2277.

17.   Shin HC, Roth HR, Gao M, Lu L, Xu Z, Nogues I, Yao J, Mollura D, Summers RM. Deep convolutional neural networks for computer-aided detection: CNN architectures, dataset characteristics and transfer learning. IEEE transactions on medical imaging. 2016 11;35(5):1285-98.

18.   Sharif Razavian A, Azizpour H, Sullivan J, Carlsson S. CNN features off-the-shelf: an astounding baseline for recognition. InProceedings of the IEEE conference on computer vision and pattern recognition workshops :. 806-813.

19.   Zhou B, Lapedriza A, Xiao J, Torralba A, Oliva A. Learning deep features for scene recognition using places database. InAdvances in neural information processing systems 2014 : 487-495.

20.   Szegedy C, Vanhoucke V, Ioffe S, Shlens J, Wojna Z. Rethinking the inception architecture for computer vision. InProceedings of the IEEE conference on computer vision and pattern recognition 2016 : 2818-2826.

21.   Szegedy C, Liu W, Jia Y, Sermanet P, Reed S, Anguelov D, Erhan D, Vanhoucke V, Rabinovich A. Going deeper with convolutions. InProceedings of the IEEE conference on computer vision and pattern recognition 2015 : 1-9).

22.   Lin M, Chen Q, Yan S. Network in network. arXiv preprint arXiv:1312.4400. 2013 16.

23.  Szegedy C, Ioffe S, Vanhoucke V, Alemi AA. Inception-v4, inception-resnet and the impact of residual connections on learning. InThirty-First AAAI Conference on Artificial Intelligence 2017 12.



Received on 25.07.2019            Modified on 24.09.2019

Accepted on 18.10.2019           © RJPT All right reserved

Research J. Pharm. and Tech 2020; 13(3):1248-1252.

DOI: 10.5958/0974-360X.2020.00230.9