Melanoma Skin Cancer Identification with Explainability Utilizing Mask Guided Technique

Lahiru Gamage, Uditha Isuranga, Dulani Meedeniya, Senuri De Silva, Pratheepan Yogarajah

Research output: Contribution to journalArticlepeer-review

2 Citations (Scopus)
6 Downloads (Pure)


Melanoma is a highly prevalent and lethal form of skin cancer, which has a significant impact globally. The chances of recovery for melanoma patients substantially improve with early detection. Currently, deep learning (DL) methods are gaining popularity in assisting with the identification of diseases using medical imaging. The paper introduces a computational model for classifying melanoma skin cancer images using convolutional neural networks (CNNs) and vision transformers (ViT) with the HAM10000 dataset. Both approaches utilize mask-guided techniques, employing a specialized U2-Net segmentation module to generate masks. The CNN-based approach utilizes ResNet50, VGG16, and Xception with transfer learning. The training process is enhanced using a Bayesian hyperparameter tuner. Moreover, this study applies gradient-weighted class activation mapping (Grad-CAM) and Grad-CAM++ to generate heatmaps to explain the classification models. These visual heatmaps elucidate the contribution of each input region to the classification outcome. The CNN-based model approach achieved the highest accuracy at 98.37% in the Xception model with a sensitivity and specificity of 95.92% and 99.01%, respectively. The ViT-based model approach achieved high values for accuracy, sensitivity, and specificity, such as 92.79%, 91.09%, and 93.54%, respectively. Furthermore, the performance of the model was assessed through intersection over union (IOU) and other qualitative evaluations. Finally, we developed the proposed model as a web application that can be used as a support tool for medical practitioners in real-time. The system usability study score of 86.87% is reported, which shows the usefulness of the proposed solution.
Original languageEnglish
Article number680
Pages (from-to)1-30
Number of pages30
Issue number4
Early online date6 Feb 2024
Publication statusPublished (in print/issue) - Feb 2024

Bibliographical note

Publisher Copyright:
© 2024 by the authors.


  • explainable AI
  • deep learning
  • artificial intelligence
  • medical imaging
  • CNN
  • VIT
  • Grad-CAM
  • Grad-Cam++
  • Grad-CAM++


Dive into the research topics of 'Melanoma Skin Cancer Identification with Explainability Utilizing Mask Guided Technique'. Together they form a unique fingerprint.

Cite this