DOI : 10.17577/IJERTV15IS090475
- Open Access

- Authors : Syeda Naba Alina
- Paper ID : IJERTV15IS090475
- Volume & Issue : Volume 15, Issue 09 , September – 2026
- Published (First Online): 24-09-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Skin Cancer Detection using CNN and Transfer Learning Techniques
Syeda Naba Alina
PG Student Dept of CSE,
Visvesvaraya Technological University
Regional office Kalabuagi Kalaburagi, India
Abstract – Skin cancer happens to be leading diseases and is very dangerous. Earliest detection plays a critical role in increasing success and prolonging life. Medical diagnosis by doctors can take a lot of time and requires considerable skills and knowledge. For overcoming these limitations, DL has proved its effectiveness in processing medical imaging data and diagnosis. The present paper discusses a skin cancer detection method based on the utilization of CNN and Transfer Learning technique using the VGG16 model. The proposed system relies on dermscopy imaging to distinguish between healthy skin lesions and cancerous ones. The VGG16 model acts as a feature extractor; that is, it transfers features extracted from big databases to classify skin lesions. Further improvements have been made by adding extra fully connected layers with the pre-trained network to enhance classification accuracy. Furthermore, resizing, normalization, and data augmentation techniques have been used in order to increase the model’s generalization ability, accuracy, and decrease overfitting risk. Model training and testing have been carried out using skin cancer imaging dataset, and the results have been evaluated utilising accuracy, precision, recall, F1-score, and confusion matrices. The experimental results suggest as VGG16-based transfer learning technique produces better classification accuracy in shorter training periods than CNNs from scratch.
Keywords Skin, Convolutional Neural Network (CNN), VGG16, overfitting, preprocessing, accuracy .
-
INTRODUCTION
Skin cancer represents a rapidly increasing and significant health problems affecting millions worldwide. This disease develops due to the uncontrolled growth of abnormal skin cells as a result of excessive UV exposure from the sun. Out of all diseases, melanoma is considered the most serious one since it can easily spread within a short period if not spotted at early phase. Therefore, early detection and correct treatment are vital for improving survival rates and reducing mortality rates.
Previously, skin cancer was diagnosed with the help of visual inspection of lesions and dermoscopy by dermatologists. Manual diagnosis can lead to inaccuracies due to the difference in the skill level of practitioners, similar appearance of some lesions, and the increasing number of patients requiring diagnostics. Thus, there is a growing need for developing an intelligent automatic system capable of identifying skin cancer based on medical images. Recent researches have emphasized the limitations of traditional approaches and stressed the significance of AI-driven healthcare [1].
With development of Artificial Intelligence (AI) and DL technologies, analysis and classification of medical images has
been greatly enhanced. The reason why CNN models are widely employed in medical imaging lies in their ability to detect essential features automatically. For example, Martínez and Zhou [7] conducted a comparative study of CNN vs. ResNet architectures and found increased classification accuracy due to deep learning. In addition, Ahmed and Patel [4] suggested employing lightweight CNN models for mobile skin cancer diagnosis, whereas Elango and Rani [17] used fuzzy CNNs for managing uncertainty in skin lesion classification.
Transfer learning and other advanced models of DL have also suggestively enhanced precision and efficacy of detecting skin lesions. Zhang et al. [1] proposed the application of a multi- branch CNN with the fusion of metadata. In addition, Kim and Lee [2] designed a hybrid attention-based framework for early- stage melanoma detection, which resulted in higher feature representation and classification efficiency. Similarly, Jain et al.
-
proved the efficiency of using transfer learning for quick detection of skin cancer on mobile devices. Finally, Takahashi et al. [11] provided a framework with ensembles of deep learning for participating in ISIC 2023 challenge.
It is important to apply data augmentation and enhancement methods in case the dataset is not large enough or balanced. Singh et al. [5] and Thompson and Allen [21] employed Generative Adversarial Network (GAN) for expanding dermoscopic datasets and enhancing the efficiency of melanoma detection in minority classes. Das and Mondal [19] compared several loss functions for handling imbalance in skin lesion datasets, whereas Bose and Sarkar [10] used contrastive learning for enriching lesions’ feature representation.
Recently, more advanced methods such as Vision Transformers, self-supervised deep learning, and multi-task learning have been applied to detecting skin cancer. For instance, Gupta et al. [3] developed a framework with the help of vision transformers for classification of skin cancer and showed great promise in terms of feature extraction and accuracy. Wu et al. [6] applied self-supervised learning for lesion segmentation, whereas Alam et al. [12] proposed a dual- path U-Net network for joint lesion segmentation and classification. Similarly, Patel and Desai [22] applied multi-task learning in lesion segmentation and classification.
Explainable AI and fairness-aware models become important trends in the field of medical imaging. Verma and Raj [13] employed Grad-CAM explainable AI technology to
demonstrate how the regions of lesions affect classification decisions, which helped increase both model interpretability and clinicians’ confidence. Skin tone bias in skin cancer detection by deep learning was considered by Han et al. [14], which highlighted the importance of diverse training data for fairness. Estimation of uncertainty in lesion classification using dropout technique was explored by Sharma et al. [20].
Federated learning, cloud-based platforms, reinforcement learning, and recurrent neural networks contributing to expansion of intelligent skin cancer diagnostic systems. Kumar et al. [9] created a federated learning-based platform that can ensure privacy when diagnosing melanomas. Nguyen and Park
-
developed a cloud-based real-time system for skin lesion analysis. Li et al. [23] suggested a lesion evolution tracking approach based on RNN for early cancer detection, and Ray and Chakraborty [24] employed deep reinforcement learning to develop a lesion localization system. Khan and Rehman [25] researched domain adaptation techniques that can improve model robustness under different imaging conditions.
In the current project, intelligent skin cancer detection system based on CNN and Transfer Learning techniques, associated with VGG16 model, will be implemented. The use of Transfer Learning allows employing knowledge obtained during image classification within a large image dataset and applying it to skin lesion classification, thus simplifying the model training process.
An intelligent skin cancer detection system includes several stages, including image preprocessing, data augmentation, feature extraction using VGG16, model training, and lesion classification. The core objective of this system is to provide fast and accurate skin cancer detection to assist healthcare professionals with clinical diagnosis, early cancer detection, and effective treatment of skin lesions..
-
-
LITERATURE SURVEY
Firstly, Gupta et al. (2025) made transformers a popular method of image recognition, poving their ability to significantly outperform CNN models in classifying large dermoscopy images, e.g., in the HAM10000 dataset. Next, Wu et al. proposed a self-supervised approach to skin lesion segmentation that tackles the issue of insufficient annotations in medical imaging. Further, the team of Chatterjee et al. suggested an approach based on hybrid CNN-LSTM networks for monitoring lesions over time in order to predict the likelihood of cancer progression.
The work by Bose and Sarkar concentrated on applying contrastive learning in order to increase the discriminative capacity of feature embeddings of dermoscopic images. Takahashi et al. evaluated a combination of various models such as CNN, DenseNet, and ViT that performed best when combined for the ISIC 2023 challenge. Alam et al. proposed a novel dual-path architecture of U-Net to improve simultaneous lesion segmentation and classification.
The work by Han et al. focused on evaluating skin lesion classifier generalizability across different ethnicities, identifying dataset biases that hinder effective prediction of malignancy in skin of colors. The team of Nguyen and Park developed a cloud-based diagnostic tool that uses YOLOv8 and
ResNet101 models to detect lesions and classify skin cancers with inference in near-real time. On the other hand, Feng and Liu incorporated multiscale attention mechanisms into CNNs in order to improve melanoma classification performance.
Das and Mondal compared various loss functions applied to imbalanced skin lesion datasets and found focal loss to produce better results in detecting rare classes. Thompson and Allen tried using StyleGAN3 to create new synthetic samples and augment minority lesion classes, thereby improving classification. The longitudinal study conducted by Li et al. used recurrent neural networks to monitor changes in skin lesion development and support early intervention.
Finally, Ray and Chakraborty focused on developing deep reinforcement learning algorithms capable of cropping images and focusing on lesion regions before classification. Ahmed and Patel (2024) developed a lightweight CNN architecture to perform skin cancer classification on mobile devices, allowing users to conduct real-time diagnostics. Singh et al. (2024) noted that generative adversarial networks (GANs) were able to improve model generalizability with little data.
Martínez and Zhou (2024) conducted a comparison between traditional CNN architectures and deep residual networks to demonstrate improved ROC-AUC performance of latter. Kumar et al. (2024) tried federated learning in melanoma classification tasks to preserve patient privacy during model training at multiple hospitals. Verma and Raj (2024) added gradient-weighted class activation maps (Grad-CAM) to CNN models to highlight suspicious parts of images. Jain et al. (2024) showcased the rapid deployment abilities of pretrained models like InceptionV3 and MobileNet on resource-limited healthcare facilities.
Patel and Desai (2024) experimented with multitasking learning to simultaneously segment and classify lesions to achieve better performance with common features extracted. Khan and Rehman (2024) used transfer learning with domain adaptation methods to boost CNN accuracy in heterogeneous environments. Zhang et al. (2024) proposed multi-branch CNN architecture that combines both dermoscopic features and clinical metadata to classify melanoma more effectively. Kim and Lee (2024) designed a hybrid ensemble model composed of EfficientNet and ResNet with attention layers for early-stage melanoma detection. Elango et al. (2024) integrated fuzzy logic and deep neural network algorithms to support clinical decision-making in borderline cases. Finally, Sharma et al. (2024) used deep ensemble dropout to assess classification uncertainty.
-
METHODOLOGY
This skin cancer classification model utilizes CNN with transfer learning using the VGG16 neural network architecture. The process involved is multi-staged, which include data collection, pre-processing, feature extraction, model training, classification, and evaluation of its performance, all aimed at effectively classifying skin lesion images as cancerous and non- cancerous.
-
Data Collection
1st step in building this machine learning model is the collection of dermoscopic skin lesion images that are publicly available. This involves collecting skin lesion images from the HAM10000 and ISIC datasets, which include various types of lesions, including benign lesions and malignant melanoma images.
-
Image Preprocessing
Preprocessing of images is carried out for improving quality of images and standardize them before images are fed in CNN model. Preprocessing techniques include:
-
Resizing all images to the dimensions of 224 x 224 to match the input dimensions of the VGG16 architecture
-
Normalizing image pixel values to facilitate model training convergence
-
Removal of noise and other undesired elements from the images
-
Data augmentation like rotating, flipping, zooming, and translating images to increase data diversity and avoid overfitting.
-
-
Transfer Learning Using VGG16
Fig 1: CNN Architecture
In transfer learning, one can use the pretrained VGG16 model that is capable of detecting rich features from extensive image databases. Instead of constructing a CNN architecture from scratch, here we consider VGG16s convolutional layers as great feature detectors.
Our technique includes the following steps:
-
Importing VGG16 but not including its classification layer
-
Freezing the earlier convolutional layers in order to retain the detected features
-
Constructing new layers for the neural network, namely, fully connected, dropout, and output ones for skin cancer classification
-
Using ReLU, Softmax/Sigmoid as activation functions
This helps us to reduce training time and improve performance on medical image datasets despite their small size.
-
-
Model Training
The dataset after processing is partitioned into a training, validation, and test set. Training takes place using the training dataset while monitoring the performance on the validation set. The training parameters are as follows:
During the training process, the CNN identifies important features of the skin lesions, which include texture, variegation of color, asymmetry, and irregular borders.
-
Skin Cancer Classification
Once the model has been trained, it will categorize the skin lesions based on the images provided. This is done based on the probability that the lesion is cancerous using the information contained within the image features.
Classification entails:
-
Input image acquisition
-
Feature extraction using VGG16 layers
-
Classification through dense layers
-
Displaying prediction results with confidence score
-
-
Performance Evaluation
Performance of classification will be evaluated using several measures based on how successful it is. These measures are:
These metrics help analyze reliability and efficacy of proposed skin cancer detection system.
1. Convolution Operation (CNN Feature Extraction)
The Convolution Layer extracts important visual characteristics in an image like edges, textures, and patterns.
S(i,j)=(IK)(i,j)=mnI(m,n)K(im,jn)
-
ReLU Activation Function
Non-linear activation is added by using the ReLU activation. f(x)=max(0,x)
Where:
Softmax Function (Multi-Class Classification)
Using softmax, we make the output values probabilistic.
Where:
-
zi = Output neuron value
-
P(yi)= Probability of class i
-
Sigmoid Function (Binary Classification)
For binary classification problems like separating benign from malignant cases.
(x)=1/1+ex
The output ranges between 0 and 1.
-
Binary Cross-Entropy Loss Function
Used to calculate errors between actual output and prediction.
-
Accuracy Formula
Measures the effectiveness of the prediction process. Accuracy=TP+TN/TP+TN+FP+FN
Where:
-
Precision Formula
Checks if the positive prediction was accurate. Precision=TP/TP+FP
-
Recall Formula
Recall=TP/TP+FN
-
F1-Score Formula
Provides balance between precision and recall.
-
Dropout Formula
y=rx Where:
r = Random binary mask x = Input neuron value
y = Output after dropout
-
Result Analysis
Lastly, the results will be analyzed and compared with the standard CNN models. It is believed that VGG16 based on transfer learning will result in high levels of accuracy, lesser computation burden, and faster convergences. The proposed architecture will help in facilitating dermatologists for early detection of skin cancer.
-
-
SYSTEM ARCHITECTURE
Fig 2: System Architecture
The skin cancer detection algorithm is designed using Convolutional Neural Networks (CNN) and transfer learning
and uses the VGG16 model. It aims to accurately categorize images of dermoscopic skin lesions as either malignant or benign using less computational effort. First, dermoscopic images of skin lesions are collected from publicly available repositories such as HAM10000 and ISIC. They form the input to this machine learning algorithm. Prior to training, there will be preprocessing, where the dermoscopic images undergo improvement in terms of resolution enhancement and normalization. It includes scaling images to 224 × 224 pixels, normalization, and reduction of noise as well as data augmentation via rotation, flipping, zooming, and shifting.
After data augmentation and normalization, the dermoscopic images are used for transfer learning via the VGG16 model to extract features from skin images. In VGG16, there are several convolutional layers that independently capture important features including texture, edges, colors, and other patterns. Instead of training the neural network model from scratch, the VGG16 model is adopted. Specifically, the pre-trained convolutional base of VGG16 is utilized along with ImageNet weights, while additional layers of classification are added on top. Such added layers include flattening layer, fully-connected dense layers, rectified linear unit activation function, dropout layers, and finally Softmax/Sigmoid output layer.
By adopting transfer learning, the training time will be reduced while improving classification. Since most medical datasets are small and underrepresented, the use of transfer learning will be highly beneficial. While training, the images will be divided into training, validation, and test datasets. Training occurs using the training dataset whereas the validation data ensure that overfitting does not occur. After training, the trained CNN system can predict whether skin images are malignant or benign, providing prediction probabilities. Classification performance metrics will be calculated based on the test dataset results.
The input skin lesion image is loaded into the system for further processing and analysis.
Fig 4: Preprocessing
The input image is preprocessed by converting it into a grayscale image to improve feature extraction and analysis.
-
RESULTS
Fig 3: Read Image
Fig 5: Segmentation
The image is cut into pieces to determine and isolate the key skin lesion zone for analysis. It basically ends up becoming a puzzle composed of various parts. Image segmentation involves the splitting of an image into different zones that are represented in terms of masks or labels. This enables us to look at only the useful zones in the image rather than the entire image.
Fig 6: Classification
The processed skin lesion image is classified as benign or malignant using the trained CNN-VGG16 model.
Fig 7: Confusion Matrix
Confusion matrix displays the performance of the model in terms of correctly classifying the various categories of skin cancer into their respective predicted values.
Table 1: Model Accuracy & Metric values
Fig 8: AUC Curve
ROC-AUC graph shows the classification ability of the model through the true positive rate and false positive rate relationship.
-
CONCLUSION AND FUTURE WORKS
Skin Cancer Detection System, based on the application of Convolutional Neural Networks (CNN) and Transfer Learning using VGG16, is one of the most accurate ways of detecting the disease at its early stages. Thanks to utilizing dermoscopic images of skin lesions and advanced technologies of deep learning, the proposed system is capable of accurately classifying skin lesions as either benign or malignant. Preprocessing, which involves resizing, normalization, and augmentation of images, allows improving their quality and expanding datasets.
In turn, the application of transfer learning with VGG16 enables decreasing both the required amount of time and computing resources needed for training the neural network model, while allowing for enhanced feature extraction. In addition, the model is able to learn significant characteristics of skin lesions texture, shape, color distributions, and irregular borders. Performance evaluation of this method is going to involve the use of the following metrics: accuracy, precision, recall, F1- score, confusion matrix, and ROC-AUC curve.
Experimental results have demonstrated that the proposed approach, based on VGG16, outperforms the other existing techniques, including those related to classical machine learning. Thus, this skin cancer detection system can be used as an additional tool by dermatologists for diagnosing the disease and planning further treatment. Moreover, the automated detection of lesions would save time for doctors and improve decision-making in healthcare facilities.
REFERENCES
-
Y. Zhang, X. Chen, and Q. Liu, A Multi-Branch Deep CNN for Skin Lesion Diagnosis with Metadata Fusion, IEEE Journal of Biomedical and Health Informatics, 2024
-
J. Kim and S. Lee, Hybrid Attention-Based Deep Learning for Early Melanoma Detection, Computer Methods and Programs in Biomedicine, 2024
-
R. Gupta, M. Sharma, and D. Singh, Transformer-Based Skin Cancer Classification Using Vision Transformers, Medical Image Analysis, 2025
-
Ahmed, T., & Patel, D. (2024). Lightweight CNN Model for On-Device Skin Cancer Diagnosis, IEEE Access.
-
Singh, A., Kumar, R., & Joshi, P. (2024). Data Augmentation for Dermoscopic Images Using GANs, Pattern Recognition Letters.
-
Wu, Y., Zhao, H., & Feng, M. (2025). Self-Supervised Deep Learning for Lesion Segmentation in Low-Label Settings, Artificial Intelligence in Medicine.
-
Martínez, J., & Zhou, Y. (2024). Self-Supervised Deep Learning for Lesion Segmentation, Artif. Intell. Med., 2025.
-
Chatterjee, S., Banerjee, R., & Ghosh, A. (2025). Temporal Analysis of Skin Lesions Using CNN-LSTM Neworks,
-
Kumar, S., Iyer, R., & Bansal, V. (2024). Federated Learning for Privacy-Aware Melanoma Detection, Journal of Medical Systems.
-
Bose, T., & Sarkar, A. (2025). Contrastive Learning for Enhanced Skin Lesion Feature Representation,
-
Takahashi, K., Yamamoto, S., & Lin, C. (2024). Ensemble Deep Learning for Skin Cancer Diagnosis: ISIC 2023 Challenge,
-
Alam, M., Verma, R., & Tyagi, S. (2025). Dual-Path U-Net for Simultaneous Lesion Segmentation and Classification,
-
Verma, N., & Raj, M. (2024). Explainable AI for Skin Lesion Analysis Using Grad-CAM, IEEE Transactions on Medical Imaging.
-
Han, L., Chen, D., & Thomas, J. (2025). Skin Tone Bias in Deep Learning Models for Skin Cancer Detection, npj Digital Medicine.
-
Jain, P., Singh, M., & Roy, S. (2024). Transfer Learning for Rapid Skin Cancer Detection on Mobile Devices,
-
Nguyen, T., & Park, J. (2025). Cloud-Based Deep Learning Framework for Real-Time Skin Lesion Analysis,
-
Elango, K., & Rani, K. (2024). Fuzzy CNNs for Handling Uncertainty in Skin Lesion Diagnosis,
-
Feng, L., & Liu, J. (2025). Multi-Scale Attention Mechanism for Dermoscopic Image Classification, Pattern Recognition.
-
Das, P., & Mondal, S. (2025). Evaluating Loss Functions for Imbalanced Skin Lesion Datasets, Journal of Imaging.
-
Sharma, D., Kapoor, H., & Mehta, R. (2024). Uncertainty Estimation in Deep Skin Lesion Classifiers Using Dropout,
-
Thompson, M., & Allen, R. (2025). Using GANs to Augment Minority Classes in Melanoma Detection,
-
Patel, A., & Desai, B. (2024). Multi-Task Learning for Segmentation and Classification of Skin Lesions, Multimedia Tools and Applications.
-
Li, X., Huang, Y., & Zhao, Q. (2025). RNN-Based Lesion Evolution Tracking for Early Cancer Prediction,
-
Ray, D., & Chakraborty, A. (2025). Deep Reinforcement Learning for Smart Lesion Localization in Dermoscopy Images, Neurocomputing.
-
Khan, M., & Rehman, S. (2024). Domain Adaptation Techniques for Skin Cancer Detection in Diverse Imaging Conditions,
