© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
Skin cancer is one of the most common cancers, which has its origin rooted to long duration exposure to the harmful ultraviolet rays from the sun. Though skin cancer is quite prevalent, it is curable if detected accurately at an initial stage. As there are nine variations of skin cancers, dermatologists often scan the skin lesions and evaluate the patient’s clinical data to identify the categories of skin cancer. As the morphologic traits are not apparent to the naked eye, correct diagnosis may be difficult. Therefore, an artificial intelligence-based automated system can be capable of identifying the type of skin cancer with better accuracy. These AI based systems are often resource-intensive, resulting in slow detection. In this research, a machine learning based lightweight system is designed for the early detection of skin cancer from skin images. Ideally, the model should be balanced where all the classes of interest have almost an equal number of images. As the dataset used for this work was not a balanced one, a preprocessing technique called data augmentation is used to improve the performance of the proposed model. After rigorous validation of the proposed model, it is observed that the light-weight MobileNet-based our proposed model could achieve as good as 97% accuracy on the training dataset and a 82% accuracy on the test dataset.
classification, class imbalance, data augmentation, ISIC dataset, MobileNet, skin cancer
Skin cancer develops when skin cells start growing uncontrollably, often owing to the continued exposure to harmful ultraviolet (UV) radiation from the sun. Being the largest and most exposed organ of our body, skin is especially vulnerable to this kind of damage, making skin cancer one of the most common forms of cancer worldwide.
The World Health Organization (WHO) reports that skin cancer is responsible for about one-third of all cancer diagnoses globally. According to the Skin Cancer Foundation, approximately one in six Americans develops skin cancer at some point in their lives, underscoring its widespread impact [1, 2]. In 2022 alone, the International Agency for Research on Cancer recorded 331,722 new cases of skin cancer [3].
Given these alarming figures, early detection, awareness, and minimizing exposure to risk factors are essential steps toward preventing and managing skin cancer effectively.
Our skin, the major organ of human body by surface area, is made up of three main layers: the hypodermis (innermost), the dermis (middle), and the epidermis (outermost). While it serves as a protective barrier, it is also vulnerable to cancer.
There are two primary types of skin cancer:
1. Malignant melanoma
2. Non-melanoma
Melanoma develops from melanocytes, the cells accountable for generating melanin, the pigment that provides our skin its color.
Melanocytes—the cells responsible for producing skin pigment—are naturally present in healthy skin and are the origin of melanoma when they become cancerous. Other common skin cancer types, such as squamous cell carcinoma, and basal cell carcinoma, originate from keratinocytes—specifically basal and squamous epithelial cells—found in the outermost layer of the skin, known as the epidermis, which has very little blood supply.
The basement membrane zone, located just beneath the basal layer of keratinocytes, separates the epidermis from the underlying dermis. Melanocytes reside in this basal layer and are responsible not only for our skin color but also for overall skin tone.
Skin cancer can occur when the DNA in these skin cells becomes damaged—often due to ultraviolet (UV) rays from the sun that penetrate beyond the surface, reaching and harming deeper layers of skin cells [4].
In this paper, a total of nine different types of skin cancers namely Basal Cell Carcinoma, Actinic Keratosis, Melanoma, Nevus, Seborrheic Keratosis, Squamous Cell Carcinoma, Pigmented Benign Keratosis, Dermatofibroma, Vascular Lesion are considered. Out of these, melanoma, basal cell carcinoma, and squamous cell carcinoma, are the three kinds of cancer that are most frequently diagnosed. Although certain forms of skin cancer might be properly treated, others, most particularly melanoma, can be deadly. Melanoma is the 6th most diagnosed malignancy in males and the 7th most frequent cancer in females [5]. However, the death rate can be substantially reduced with early melanoma identification [6].
To detect melanoma, dermatologists scan skin lesions for skin cancer, evaluate patient clinical data, and categorise lesions based on their experience but the accuracy measure of melanoma diagnosis by bare eye often inaccurate. Although dermatoscopy [7, 8] is a non-invasive diagnostic procedure that employs optic magnification to enable the observation of morphologic traits that are not apparent to the naked eye, correct diagnosis is difficult and depends on sufficient training and expertise. Therefore, there is immense need for computer aided diagnostic (CAD) systems for the skin cancer due to the increasing prevalence and dearth of specialists.
An artificial intelligence-based automated system has a high potential of detecting skin cancer from such images as automated systems are more capable of identifying patterns from some images that may not be identifiable by human eyes. Many researchers have already channelized their studies for the same purpose. However, such machine learning-based systems often require high computing power and longer hours to train the model. Therefore, a lightweight machine-learning model for identifying skin cancer and classifying them into different classes from the input images is the need of the hour. Additionally, the data available in this domain is often imbalanced, leading to poor accuracy for the minority classes.
In this work, a transfer learning-inspired less resource hungry model is proposed to identify various types of skin cancer. The model issues the ISIC skin cancer dataset [9] in its training, which contains 2357 images of all nine types of skin cancer. Moreover, the proposed system handles the class imbalance problem to improve the classification for minority classes.
The research questions addressed here are a. what are the available methodologies for skin cancer detections? b. How the dataset is preprocessed and made suitable for classification? c. Is there any lightweight classification method for a large color image dataset with RGB data? d. what transfer learning model could be best performing for classifying various skin cancer classes?
The subsequent sections of the research paper is organized as follows: Section II presents the overview of the contemporary research for skin cancer detection; Section III depicts the proposed architecture; Section IV presents the results, and Section V concludes the paper outlining some future research opportunities.
For identifying the type of skin cancer from images require pre-processing the images and then applying various classification algorithms on those pre-processed images. Many researchers have already worked towards the same. A brief overview of the existing works is presented here.
2.1 Image segmentation for skin cancer detection
Image segmentation is the method of classifying the pixels of an image into different categories depending on the characteristics or features. Ideally, the pixels having the same characteristics are classified into a single category. Once the image is segmented, it is easy to study the image as the borders of different categories are highlighted. In this section, the segmentation techniques of various research papers are analyzed and compared.
In the study [10], the authors introduced an image segmentation technique based on an evolutionary strategy to identify skin lesion areas within an elliptical boundary. This method was tested on a dataset that included 51 cross-polarized images and 60 transillumination images. All of these images were manually segmented by a dermatologist and used as the core training data for the approach. Barcelos and Pires [11] proposed a unique segmentation technique that combines the Canny edge detector and nonlinear diffusion equations for effectively recognizing input skin edge lesions. The noisy skin lesion i.e. skin with body hair were used in the empirical research such that more accurate results can be obtained through the testing procedure of the proposed segmentation strategy.
Abbas et al. [12] devised a modified Region-based Active Contours and an innovative unsupervised method for segmenting different lesion types. This algorithm lowered the false positive rate as well as improved the true detection rate.
Ribbens et al. [13] proposed a combination of segmentation and atlas creation based technique to enhance the accuracy of segmentation. They also illustrated the feasibility of their novice designed framework using two datasets BrainWeb and ADNI.
A technique called the computational approach was introduced by Oliveira et al. [14], where traits like asymmetry, texture, border, and color were used to segregate skin lesion from normal images.
Flores and Scharcanski [15] proposed a strategy for learning features such that the skin lesion images can be segmented by recognizing the most influential skin features. Rundo et al. [16] also proposed a segmentation method.
Fan et al. [17] put forth another segmentation technique that integrates saliency with the Otsu threshold approach. In order to achieve more precise skin lesion patches, the Otsu threshold technique was optimized based on the frequency distribution in their segmentation process.
Agarwal et. al. [18] proposed a K-means clustering algorithm for separating the area of interest from the background. Smoothing filter and area thresholding are used to discard the erroneous pixels from the resultant image got after segmentation. Comparing the skin lesions obtained from the algorithm with the already labeled images provided a correlation score of 97.66%, which indicates that this segmentation technique can be used for real-life applications.
Priya H. et al. [19] proposed an Otsu-threshold based approach for separating the front from the background by matching individual pixels with the threshold value.
Al-Masni et al. [20] proposed a full resolution convolutional networks-based approach for segmentation. The suggested approach learns the full-resolution characteristics of each pixel in the input data without requiring any pre- or postprocessing procedures.
By employing highly discriminative features including a two-component speed function, and contour propagation approach, Tajeddin and Asl [21] developed another segmentation technique to identify skin lesions.
Mane and Shinde [22] proposed another framework for finding melanoma skin cancer. This framework has three stages: lesions are pre-processed in the stage one, segmentation is done on those pre-processed images in the second stage; and the distinctive features are extricated from the segmented images in the final stage.
To detect melanoma skin cancer, Thanh et al. [23] recommended automated image processing strategies. This is a three-step procedure: pre-processing using adaptive principal curvature; skin lesion segmentations using colour standardization; and feature are extracted by employing the ABCD rule.
In another approach of segmentation of melanoma skin cancer is addressed by the use of a new algorithm by Masoud Abdulhamid et.al. [24]. The solution leverages a curve-based smoothening of an auxiliary function, created using a commonly used local optimizer.
Reis et. al. [25] propose InSiNet, a CNN-based algorithm to classify malignant and benign lesions using segmentation on ISIC data set.
2.2 Clustering based skin cancer detection
Mahmoud et al. [26] proposed an automated method for classifying images of melanocytic nevi and malignant melanoma. The system combines image processing techniques with features extracted from histopathological images of skin lesions. It also incorporates a flexible color filter to enhance image quality and uses the K-means clustering algorithm to segment the lesions effectively.
Munia et al. [27] devised another melanoma diagnosis system that is based on the Otsu thresholding mechanism, and current k-means clustering algorithm. The method accurately segments the different sectors of the image and also extracts the borders of the affected zone. The model shows around 89.7% accuracy.
Lian et al. [28] proposed a Dempster-Shafer theory for carrying out segmenting the tumors with three dimensionalities.
The histogram-based clustering estimation (HBCE) algorithm was presented by Ashour et al. [29] as a novel method for recognizing skin lesions to find the number of clusters involved in the neutrosophic c-means clustering (NCM) method. The model was trained on 900 images and validated using 379 images from the the ISIC-2016 image repository.
Sithambranathan et. al. [30] proposed to determine the clusters with high accuracy by employing K-Means and SVM (Support Vector Machine).
2.3 Classification based skin cancer detection
2.3.1 Machine learning based classification methods
Jukić et al. [31] introduced a novel method for identifying traits in medical color images of skin lesions to classify them. These features were formulated by utilizing the tensor disintegration of the medical color image of a skin lesion. Gautam and Ahmed [32] proposed a SVM based classifier for identifying and categorizing melanoma. The authors started with a novel segmentation method based on the compensation of lighting and reduced the noise using an iterative dilation technique. Finally, few selected features which are helpful for melanoma detection are selected and fed into the SVM to get the classification of skin lesions.
Jiji et al. [33] proposed an image analysis based for the colour and feature extractions. The main approach used here is to use the color and form features cumulatively to formulate a feature vector; standardize features using Min-Max normalization method; and to employ particle swarm optimization (PSO) technique for effective multi-class classification.
Abuzaghleh et al. [34] presented a tool for early detection of melanoma. The first part of this method acts as a real-time alert system, helping users avoid sunburn by providing a newly developed formula to estimate how long it takes for their skin to become damaged or burned under sun exposure. The second part of the system handles image analysis and includes several key steps: pre-processing image, discovering and removing hair, segmenting lesion, extracting features, and finally, classifying image. This approach was tested using a dataset of 200 skin images.
Rashad and Takruri [35] suggested a new non-invasive model that uses a SVM to identify melanoma-type skin cancer. They used image properties extracted from skin cancer images, including color features from the original color input images and Grey Level Cooccurrence Matrices (GLCM).
Tiwari and Sharma [36] utilized entropy-based methods to extract skin lesions from samples of melanoma. The random measure at each grayscale range threshold was evaluated using a variety of widely used entropy functions, including Shannon, Kapur, Renvi, Havrda, and Vajda. Joseph and Panicker [37] proposed an automated melanoma identification method using image processing techniques and mobile technology. For the pre-processing and noise removal of images, quick marching in painting procedure has been used.
Zakeri and Soukhtesaraie [38] proposed a Decision Support based technique by leveraging the melanoma detection using a Gaussian mixed neural network based on log linearization. To find the most appropriate and noticeable traits, a feature engineering.
Nezhadian and Rashidi [39] proposed another framework for melanoma identification. Image segmentation is done using an active function technique after which texture, and colorful components, were obtained. The texture-based picture characteristics were employed to diagnose the disease.
Relying on the ABCD rule, Monisha et al. [40] proposed a unique framework for classifying images of hazardous melanoma skin. The feature extraction method used here combines LBP for texture-related feature extraction with enhanced picture for asymmetry recognition, boundary detection, image color identification, and diameter detection.
Rebouças Filho et al. [41] proposed to classify melanoma depending on the structural co-occurrence matrix of the key frequencies accumulated from traditional dermoscopy images.
Xu et al. [42] reported a computer-aided system for automatic melanocytic tumor analysis and classification. The technique comprises of four sections. Utilizing a multi-class SVM in the final stage on the obtained skin images, those are categorized into different categories like melanoma, nevus, and normal tissue.
Lenhardt et al. [43] proposed a K-Nearest Neighbour based skin cancer detection system where both classes of samples were utilized for training the neural network. The dimensionality of the observed spectra was decreased by applying the PCA approach
Mengistu and Alemayehu [44] proposed a self-organizing neural network (SONN) and radial basis function neural network based solution for detecting three different types of cancers from skin images. GLCM, colour, and morphological features of lesion images are extracted and those features have been used as input for classification.
Sajid et al. [45] proposed a KNN-based skin cancer identification framework by employing a group of textual and statistical features. Before extracting feature vector, noise removal was performed by using a median filter.
It is observed from the existing researches that not only is there a dearth of authentic datasets of the skin cancer images but also the datasets have a smaller number of images which are insufficient for training and testing a proposed model. To balance the training and testing datasets, several researchers have employed various augmentation methods of images. Lots of researches have been done for identifying the skin cancer using machine learning techniques especially CNN, SVM, ANN, GLCM, ABCD rules KNN methods. Some researchers have even tried combining multiple methods for improving the performance.
2.3.2 Classification methods based on Deep learning
Deep learning is the specialized branch of machine learning where algorithms are designed as per the functions and structures of human brain. The traditional approaches of deep learning are ANN-based algorithms, CNN-based solutions, Kohonen-SONN-based solutions etc. Significant amount of research on detecting skin cancer from images have been performed using all these techniques.
The dataset for ANN based approaches can be a labelled or unlabeled dataset which can be handled by employing either supervised or unsupervised learning strategies. Many researchers have used ANN based systems for skin cancer detection.
Xie and Bovik [46] also focused their research in developing a skin lesion classification model for classifying the lesion images into benign and malignant categories. In this method, a self-generating neural network was utilized to extract lesions from photos. Key features like the tumor borders, color, and texture were identified, and Principal Component Analysis (PCA) was applied for feature optimization. Finally, an ensemble model combining backpropagation and fuzzy neural networks was employed to classify the lesions.
Masood et al. [47] developed an automated skin cancer diagnostic system using ANN, focused on classifying moles. Since melanoma moles are typically larger than 6 mm in diameter, this measurement was used as a threshold for identifying potential melanoma cases. Based on this approach, the system classifies moles into one of three categories—common, uncommon, or melanoma—using a feed-forward ANN with backpropagation to support accurate diagnosis.
Jaleel et. al. [48] proposed a technique of melanoma detection based on back propagation ANN. The proposed system also employed two-dimensional wavelet transformation technique for feature extraction.
Choudhari and Biday [49] proposed a technique for detecting melanoma that used a maximum entropy thresholding measure to segment skin images. A feed-forward ANN is employed for classification, and a GLCM is used for unique feature extractions in input images. Aswin et al. [50] proposed an innovative method to diagnosis skin cancer based on ANN and genetic algorithms (GA). Images were pre-processed using the Otsu thresholding method, segmented using the GLCM methodology to extract unique features, and then classified into carcinogenic and non-carcinogenic categories employing a hybrid GA and ANN classifier.
Convolution neural network based methods have proved to be truly useful for segmentation, detection and classification of medical images. CNN based approaches have extensively been employed for categorizing melanoma skin images into benign and malignant categories. Some of the benchmark works are briefed here.
Yu et al. [51] suggested a CNN based method for detecting melanoma. It employs a fully convolutional residual network (FCRN) having 16 residual blocks for segmenting the images. Final classification is obtained by performing an average of SVM and softmax classifier.
In order to extract deep features from the pictures, Mahbod et al. [52] suggested an approach that used pretrained AlexNet, ResNet-18, and VGG16. These characteristics were then utilized to train a multi-class SVM classifier, and classification was achieved by blending the classifier's output. Dorj et al. [53] used a pre-trained deep CNN model named AlexNet for extracting distinguishing traits, and then error-correcting output coding SVM for classifying the images into four different categories.
From the above discussion, it is evident that significant work has been done in applying various artificial intelligence based methodologies for identifying different types of skin cancer from given images. It began with classical image segmentation techniques including active contours, region‑based methods, Otsu thresholding, K-means clustering, edge detection, saliency-based segmentation, and atlas-driven frameworks. These approaches enhanced lesion boundary identification but were sensitive to illumination variation, noise, and irregular lesion shapes.
Afterwards came the clustering approach where algorithms like k-means, Dempster-Shafer theory, Neutrosophic clustering etc. were employed for partitioning lesion regions. However, as these models relied on initial cluster assumptions, identifying complex skin patterns were difficult.
To curtail the reliance on initial cluster assumptions, came the traditional machine learning based classification algorithms like SVM, KNN, ANN, etc. which relied on hand-crafted features like color, shape, texture, symmetry and so on. Although these methods achieved reasonable accuracy, their robustness was limited due to manual feature engineering. With the advent of deep learning, CNN based models have significantly improved melanoma detection by learning the features from the images. However, these models are often computationally exhaustive and get biased if the dataset is not balanced.
From the above synthesis, it is evident that despite extensive research, major challenges remain: (1) heavy CNN models are unsuitable for low-resource environments; (2) imbalanced datasets reduce classification reliability. This lacunae in the existing research motivated us to design a lightweight architecture that is useful for huge imbalanced data set processing with minimum system requirements and better accuracy. The proposed methodology is elaborated in the next section.
In this work, a Mobile-net architecture-based model is proposed to identify and classify images with high accuracy, as depicted in Figure 1. The proposed model has also been fine-tuned to accommodate very large datasets. The proposed model consists of four major modules: A. Skin Image Dataset Selection, B. Data Preprocessor, C. Mobile Net architecture, and D. Image Classifier module. Each module is elaborated hereafter.
3.1 Skin image dataset selection
The International Skin Imaging Collaboration (ISIC) provided the dataset used in this study. There are 2357 high-quality skin cancer images in this data set, which are divided into nine classes representing nine distinct skin cancer types. The distribution of images belonging to different classes are depicted in Figure 2.
Figure 1. Proposed architecture
Figure 2. The distribution of images belonging to nine classes
3.2 Data preprocessor module
Though the dataset is robust with high-quality images and obtained from a trusted source, some inconsistencies exist, like improper image distribution for each type of cancer, i.e, some cancer types have significantly more images with respect to some other cancer types or some of the images contain hair and hair follicles which may hinder the image classification. In certain images, characteristics such as image orientation, brightness, color, and distinguishing features are not visible. Therefore, data pre-processing is done to enhance the dataset's quality. To address the data imbalance issue, the first step is data augmentation, which creates new images from the existing ones. Brightness correction, geometric transformation, image filtering and segmentation, and, lastly, image restoration based on the Fourier transform have all been employed in this work. Before proceeding with the next stage, all images barring the melanomas and moles, were sorted as per the suggested categorization determined by ISIC. Leaving the melanomas and moles which has less number of images, it is ensured that all other subgroups contain almost an equal number of images.
3.3 MobileNet architecture
This research aims to find out a light-weight model with high accuracy. MobileNet architecture was finalized for classification as it is a light-weight version of CNN model that can be implemented with few layers only. This architecture reduces the number of parameters to train and uses depth-wise separable convolutions. This is a specialized version to use in embedded and mobile version applications.
3.4 Classification module
The classification module, as shown in Figure 3, is in charge of categorizing the pictures into different kinds of skin cancer. The softmax classifier receives the images that have been processed by the mobile-net module's final layer. A vector of K real numbers can be transformed into a vector of distributions with K alternative outcomes using the softmax classifier, which is essentially a mathematical function. The probability of each value in the vector is inversely proportional to its relative scale. The output of a neural network is normalized to a probability distribution across all nine expected output classes using the softmax function, which serves as the network's final activation function. Every value in the output of the soft-max function is considered to be the probability that a particular class will contain that value.
Figure 3. Classification module
To create the best model for our problem statement, we experimented with various input layer combinations and a number of additional classification functions. The current model emerged as the most effective model to categorize the images into the appropriate skin cancer classifications more quickly and accurately. When the model is finished, it has been adjusted to work well with large datasets. The same model is trained and evaluated on the chosen dataset following fine-tuning. The following section presents the experimental results.
It is understood that the prediction accuracy depends on the dataset, various input layers, combinations of those input layers, and various functions for classifications. In this work, experiments were performed using MobileNet (α = 1.0) with hyperparameters tested within typical ranges (learning rate 1e−3–1e−4, batch size 16–32, Adam optimizer). The final model used the configuration that produced the highest validation accuracy within this range. The model was fine-tuned using standard transfer-learning procedures. Initially, the pretrained convolutional base was frozen, and only the classification head was trained. Subsequently, a subset of deeper layers was unfrozen for fine-tuning with a reduced learning rate. All fine-tuning hyperparameters followed typical ranges used in MobileNet transfer-learning workflows (e.g., small learning-rate reductions and moderate batch sizes). Since the goal of the study was not hyperparameter optimization but evaluating the effect of lightweight architecture and augmentation, only minimal tuning was performed.
Firstly the proposed model is trained without addressing the class imbalance; however, as depicted in the Figure 4, the result was not satisfactory. Training and validation accuracy, and loss all showed variations in the outcome.
Figure 4. Training and validation results variation in the imbalanced dataset
Figure 5. Training and validation results variation after rectifying the class imbalance problem
To address the issue of class imbalance, a Python library called Augmentor was used to generate new samples by augmenting the existing images in the dataset. These augmented images were then combined with the original ones, and the model was trained using this expanded dataset. A similar augmentation process was also implemented using the TensorFlow library.
Model training plays a crucial role in achieving accurate results, as this is the phase where the system learns to recognize the unique features of each image. Following the 80:20 rule, the 80% of samples are used for training and 20% for testing the model’s performance.
To ensure fairness and avoid bias, data slicing techniques were used to evaluate the model across different randomized train-test split of the dataset. Each training set was curated independently through random sampling, promoting balanced learning and more robust generalization.
The training and validation accuracy and loss are shown in Figure 5.
From Figure 6, it is recognized that the suggested skin cancer prediction model employs a number of performance metrics, including prediction accuracy, true positive, and false positive, and that its performance is consistent across the four trials. The performance analysis is shown as true negative and false positive in Figure 7.
To evaluate the effectiveness of the proposed model, its performance is compared with commonly used baseline architectures for medical image classification, including a Standard CNN and ResNet50.
Figure 6. Impact of augmentation on model performance
Figure 7. ROC-AUC curve for proposed method
It is observed from Table 1 that the proposed MobileNet achieves better overall accuracy of 82%, with balanced precision (0.83), recall (0.81), and F1-score (0.82). It outperforms the Standard CNN, which achieves 78% accuracy, and comparable with ResNet50, which attains 81% accuracy. ResNet50 performs close to MobileNet but with higher computational cost.
Table 1. Performance comparison of models on multi-class skin cancer classification
|
Model |
Accuracy (%) |
Precision |
Recall |
F1-Score |
|
Proposed MobileNet |
82 |
0.83 |
0.81 |
0.82 |
|
Standard CNN |
78 |
0.79 |
0.77 |
0.78 |
|
ResNet50 |
81 |
0.82 |
0.80 |
0.81 |
ResNet50 performs close to MobileNet but incurs a higher computational cost. In contrast, MobileNet, as a lightweight model, provides a computationally efficient solution, making it well-suited for deployment in resource-constrained environments compared to the heavier baseline models.
The performance analysis for all 9 categories (classes 0 to 8) is presented as true negative and false positive in Figure 7. The proposed model has shown 97% accuracy for the training dataset and 82% accuracy for the test dataset, as shown in Figure 7. The accuracy achieved by the proposed model ranges from 80% to 99% across all types of skin cancer. Although, the accuracy for type 3 (melanoma) remains comparatively lower than that of the other classes, even after addressing the class-imbalance issue. The reason is that even to the unaided eye, the characteristics in the melanoma image are difficult to discern from those in other images. To increase the accuracy of melanoma detection in the future, various strategies could be investigated such as segmenting the pictures to distinctly segregate the characteristics and then feeding the segmented image to the classifier.
Although a degree of overfitting was observed, the model demonstrated stable performance across multiple randomized data splits. This consistency suggests that the observed results are not dependent on a particular partitioning of the dataset and that the model’s generalization behavior remains reliable.
In this study, a lightweight model using transfer learning was developed to classify input skin images into one of nine types of skin cancer. The model is built on the MobileNet architecture, which includes convolutional (CNN) layers, pooling, and dropout layers, with a SoftMax classifier at the end for final prediction. MobileNet’s layers are used to extract relevant features from the input images.
Initially, the model was trained on a dataset that had an uneven number of images across different classes, which impacted performance. To address this class imbalance, image augmentation techniques were applied. The results clearly showed that addressing the imbalance significantly improved the model’s accuracy—nearly doubling it.
The final model achieved more than 97% accuracy on the training set and 82% accuracy on the test set, outperforming Standard CNN and slightly surpassing ResNet50, while offering a lightweight and computationally efficient solution for multi-class skin cancer classification. However, it struggled to accurately classify type 3 skin cancer, which remains a limitation. Future improvements could focus on better distinguishing this type by exploring alternative methods, such as calculating invariant shape descriptors using different Fourier series.
Additionally, other classification techniques could be explored to further enhance performance. There’s also potential to extend the MobileNet-based architecture to support 3D image classification by applying transform calculations in the spatiotemporal domain.
[1] Cruz, J.A., Wishart, D.S. (2006). Applications of machine learning in cancer prediction and prognosis. Cancer Informatics, 2: 117693510600200030. https://doi.org/10.1177/117693510600200030
[2] Linares, M.A., Zakaria, A., Nizran, P. (2015). Skin cancer. Primary Care, 42(4): 645-659. https://doi.org/10.1016/j.pop.2015.07.006
[3] Bray, F., Laversanne, M., Sung, H., Ferlay, J., Siegel, R.L., Soerjomataram, I., Jemal, A. (2024). Global cancer statistics 2022: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries. CA: A Cancer Journal for Clinicians, 74(3): 229-263. https://doi.org/10.3322/caac.21834
[4] Leffell, D.J., Brash, D.E. (1996). Sunlight and skin cancer. Scientific American, 275(1): 52-59. https://www.jstor.org/stable/24993269.
[5] Wighton, P., Lee, T.K., Lui, H., McLean, D.I., Atkins, M.S. (2011). Generalizing common tasks in automated skin lesion diagnosis. IEEE Transactions on Information Technology in Biomedicine, 15(4): 622-629. https://doi.org/10.1109/TITB.2011.2150758
[6] Sadeghi, M., Razmara, M., Lee, T.K., Atkins, M.S. (2011). A novel method for detection of pigment network in dermoscopic images using graphs. Computerized Medical Imaging and Graphics, 35(2): 137-143. https://doi.org/10.1016/j.compmedimag.2010.07.002
[7] Madooei, A., Drew, M.S. (2013). A colour palette for automatic detection of blue-white veil. In Proc. IS&T 21st Color and Imaging Conference, pp. 200-205. https://doi.org/10.2352/CIC.2013.21.1.art00036
[8] Celebi, M.E., Aslandogan, Y.A. (2004). Content-based image retrieval incorporating models of human perception. In International Conference on Information Technology: Coding and Computing, 2004, Vegas, NV, USA, pp. 241-245. https://doi.org/10.1109/ITCC.2004.1286639
[9] Codella, N.C.F., Gutman, D., Celebi, M.E., Helba, B., et al. (2018). Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (ISBI), hosted by the international skin imaging collaboration (ISIC). In 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), pp. 168-172. https://doi.org/10.1109/ISBI.2018.8363547
[10] Yuan, X., Situ, N., Zouridakis, G. (2008). Automatic segmentation of skin lesion images using evolution strategies. Biomedical Signal Processing and Control, 3(3): 220-228. https://doi.org/10.1016/j.bspc.2008.02.003
[11] Barcelos, C.A.Z., Pires, V.B. (2009). An automatic based nonlinear diffusion equations scheme for skin lesion segmentation. Applied Mathematics and Computation, 215(1): 251-261. https://doi.org/10.1016/j.amc.2009.04.081
[12] Abbas, Q., Fondón, I., Rashid, M. (2011). Unsupervised skin lesions border detection via two-dimensional image analysis. Computer Methods and Programs in Biomedicine, 104(3): e1-e15. https://doi.org/10.1016/j.cmpb.2010.06.016
[13] Ribbens, A., Hermans, J., Maes, F., Vandermeulen, D., Suetens, P. (2013). Unsupervised segmentation, clustering, and groupwise registration of heterogeneous populations of brain MR images. IEEE Transactions on Medical Imaging, 33(2): 201-224. https://doi.org/10.1109/TMI.2013.2270114
[14] Oliveira, R.B., Marranghello, N., Pereira, A.S., Tavares, J.M.R. (2016). A computational approach for detecting pigmented skin lesions in macroscopic images. Expert Systems with Applications, 61: 53-63. https://doi.org/10.1016/j.eswa.2016.05.017
[15] Flores, E., Scharcanski, J. (2016). Segmentation of melanocytic skin lesions using feature learning and dictionaries. Expert systems with Applications, 56: 300-309. https://doi.org/10.1016/j.eswa.2016.02.044
[16] Rundo, L., Stefano, A., Militello, C., Russo, G., et al. (2017). A fully automatic approach for multimodal PET and MR image segmentation in gamma knife treatment planning. Computer Methods and Programs in Biomedicine, 144: 77-96. https://doi.org/10.1016/j.cmpb.2017.03.011
[17] Fan, H., Xie, F., Li, Y., Jiang, Z., Liu, J. (2017). Automatic segmentation of dermoscopy images using saliency combined with Otsu threshold. Computers in Biology and Medicine, 85: 75-85. https://doi.org/10.1016/j.compbiomed.2017.03.025
[18] Agarwal, A., Issac, A., Dutta, M.K., Riha, K., Uher, V. (2017). Automated skin lesion segmentation using k-means clustering from digital dermoscopic images. In 2017 40th International Conference on Telecommunications and Signal Processing (TSP), Barcelona, Spain, pp 743-748. https://doi.org/10.1109/TSP.2017.8076087
[19] Priya H., A.G., Anitha, J., Poonima J., J. (2018). Identification of melanoma in dermoscopy images using image processing algorithms. In 2018 International Conference on Control, Power, Communication and Computing Technologies (ICCPCCT), Kannur, India, pp. 553-557. https://doi.org/10.1109/ICCPCCT.2018.8574277
[20] Al-Masni, M.A., Al-Antari, M.A., Choi, M.T., Han, S.M., Kim, T.S. (2018). Skin lesion segmentation in dermoscopy images via deep full resolution convolutional networks. Computer Methods and Programs in Biomedicine, 162: 221-231. https://doi.org/10.1016/j.cmpb.2018.05.027
[21] Tajeddin, N.Z., Asl, B.M. (2018). Melanoma recognition in dermoscopy images using lesion's peripheral region information. Computer Methods and Programs in Biomedicine, 163: 143-153. https://doi.org/10.1016/j.cmpb.2018.05.005
[22] Mane, S., Shinde, S. (2018). A method for melanoma skin cancer detection using dermoscopy images. In 2018 Fourth International Conference on Computing Communication Control and Automation (ICCUBEA), Pune, India, pp. 1-6. https://doi.org/10.1109/ICCUBEA.2018.8697804
[23] Thanh, D.N., Prasath, V.S., Hieu, L.M., Hien, N.N. (2020). Melanoma skin cancer detection method based on adaptive principal curvature, colour normalisation and feature extraction with the ABCD rule. Journal of Digital Imaging, 33(3): 574-585. https://doi.org/10.1007/s10278-019-00316-x
[24] Masoud Abdulhamid, I.A., Sahiner, A., Rahebi, J. (2020). New auxiliary function with properties in nonsmooth global optimization for melanoma skin cancer segmentation. BioMed Research International, 2020(1): 5345923. https://doi.org/10.1155/2020/5345923
[25] Reis, H.C., Turk, V., Khoshelham, K., Kaya, S. (2022). InSiNet: A deep convolutional approach to skin cancer detection and segmentation. Medical & Biological Engineering & Computing, 60(3): 643-662. https://doi.org/10.1007/s11517-021-02473-0
[26] Mahmoud, M.K.A., Al-Jumaily, A., Maali, Y., Anam, K. (2013). Classification of malignant melanoma and benign nevi from skin lesions based on support vector machine. In 2013 Fifth International Conference on Computational Intelligence, Modelling and Simulation, Seoul, Korea (South), pp. 236-241. https://doi.org/10.1109/CIMSim.2013.45
[27] Munia, T.T.K., Alam, M.N., Neubert, J., Fazel-Rezai, R. (2017). Automatic diagnosis of melanoma using linear and nonlinear features from digital image. In 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jeju, Korea (South), pp. 4281-4284. https://doi.org/10.1109/EMBC.2017.8037802
[28] Lian, C., Ruan, S., Denoeux, T., Li, H., Vera, P. (2017). Spatial evidential clustering with adaptive distance metric for tumor segmentation in FDG-PET images. IEEE Transactions on Biomedical Engineering, 65(1): 21-30. https://doi.org/10.1109/TBME.2017.2688453
[29] Ashour, A.S., Guo, Y., Kucukkulahli, E., Erdogmus, P., Polat, K. (2018). A hybrid dermoscopy images segmentation approach based on neutrosophic clustering and histogram estimation. Applied Soft Computing, 69: 426-434. https://doi.org/10.1016/j.asoc.2018.05.003
[30] Sithambranathan, M., Kasim, S., Hassan, M.Z., Rodzuan, N.A.S. (2020). Identification of gene of melanoma skin cancer using clustering algorithms. International Journal of Data Science, 1(1): 51-56. https://doi.org/10.18517/ijods.1.1.51-56.2020
[31] Jukić, A., Kopriva, I., Cichocki, A. (2013). Noninvasive diagnosis of melanoma with tensor decomposition-based feature extraction from clinical color image. Biomedical Signal Processing and Control, 8(6): 755-763. https://doi.org/10.1016/j.bspc.2013.07.001
[32] Gautam, D., Ahmed, M. (2015). Melanoma detection and classification using SVM based decision support system. In 2015 Annual IEEE India Conference (INDICON), New Delhi, India, pp. 1-6. https://doi.org/10.1109/INDICON.2015.7443447
[33] Jiji, G.W., DuraiRaj, P.J. (2015). Content-based image retrieval techniques for the analysis of dermatological lesions using particle swarm optimization technique. Applied Soft Computing, 30: 650-662. https://doi.org/10.1016/j.asoc.2015.01.058
[34] Abuzaghleh, O., Barkana, B.D., Faezipour, M. (2015). Noninvasive real-time automated skin lesion analysis system for melanoma early detection and prevention. IEEE Journal of Translational Engineering in Health and Medicine, 3: 1-12. https://doi.org/10.1109/JTEHM.2015.2419612
[35] Rashad, M.W., Takruri, M. (2016). Automatic non-invasive recognition of melanoma using Support Vector Machines. In 2016 International Conference on Bio-Engineering for Smart Technologies (BioSMART), Dubai, United Arab Emirates, pp. 1-4. https://doi.org/10.1109/BIOSMART.2016.7835462
[36] Tiwari, R., Sharma, B. (2016). A comparative study of Otsu and entropy based segmentation approaches for lesion extraction. In 2016 International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India, pp. 1-4. https://doi.org/10.1109/INVENTIVE.2016.7823182
[37] Joseph, S., Panicker, J.R. (2016). Skin lesion analysis system for melanoma detection with an effective hair segmentation method. In 2016 International Conference on Information Science (ICIS), Kochi, India, pp. 91-96. https://doi.org/10.1109/INFOSCI.2016.7845307
[38] Zakeri, A., Soukhtesaraie, S. (2017). Automatic diagnosis of melanoma using log-linearized Gaussian mixture network. In 2017 24th National and 2nd International Iranian Conference on Biomedical Engineering (ICBME), Tehran, Iran, pp. 1-6. https://doi.org/10.1109/ICBME.2017.8430224
[39] Nezhadian, F.K., Rashidi, S. (2017). Melanoma skin cancer detection using color and new texture features. In 2017 Artificial Intelligence and Signal Processing Conference (AISP), Shiraz, Iran, pp. 1-5. https://doi.org/10.1109/AISP.2017.8324108
[40] Monisha, M., Suresh, A., Bapu, B.T., Rashmi, M.R. (2019). Retracted article: Classification of malignant melanoma and benign skin lesion by using back propagation neural network and ABCD rule. Cluster Computing, 22(Suppl 5): 12897-12907. https://doi.org/10.1007/s10586-018-1798-7
[41] Rebouças Filho, P.P., Peixoto, S.A., da Nóbrega, R.V.M., Hemanth, D.J., Medeiros, A.G., Sangaiah, A.K., de Albuquerque, V.H.C. (2018). Automatic histologically-closer classification of skin lesions. Computerized Medical Imaging and Graphics, 68: 40-54. https://doi.org/10.1016/j.compmedimag.2018.05.004
[42] Xu, H., Lu, C., Berendt, R., Jha, N., Mandal, M. (2018). Automated analysis and classification of melanocytic tumor on skin whole slide images. Computerized Medical Imaging and Graphics, 66: 124-134. https://doi.org/10.1016/j.compmedimag.2018.01.008
[43] Lenhardt, L., Zeković, I., Dramićanin, T., Dramićanin, M.D. (2013). Artificial neural networks for processing fluorescence spectroscopy data in skin cancer diagnostics. Physica Scripta, 2013(T157): 014057. https://doi.org/10.1088/0031-8949/2013/T157/014057
[44] Mengistu, A.D., Alemayehu, D.M. (2015). Computer vision for skin cancer diagnosis and recognition using RBF and SOM. International Journal of Image Processing (IJIP), 9(6): 311-319.
[45] Sajid, M., Khan, A.H., Malik, T.S., Bilal, A., Ahmad, Z., Sarwar, R. (2025). Enhancing melanoma diagnostic: Harnessing the synergy of AI and CNNs for groundbreaking advances in early melanoma detection and treatment strategies. International Journal of Imaging Systems and Technology, 35(1): e70016. https://doi.org/10.1002/ima.70016
[46] Xie, F., Bovik, A.C. (2013). Automatic segmentation of dermoscopy images using self-generating neural networks seeded by genetic algorithm. Pattern Recognition, 46(3): 1012-1019. https://doi.org/10.1016/j.patcog.2012.08.012
[47] Masood, A., Al-Jumaily, A., Anam, K. (2015). Self-supervised learning model for skin cancer diagnosis. In 2015 7th International IEEE/EMBS Conference on Neural Engineering (NER), Montpellier, France, pp. 1012-1015. https://doi.org/10.1109/NER.2015.7146798
[48] Jaleel, J.A., Salim, S., Aswin, R. (2012). Artificial neural network based detection of skin cancer. International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering, 1(3): 200-205.
[49] Choudhari, S., Biday, S. (2014). Artificial neural network for skin cancer detection. International Journal of Emerging Trends & Technology in Computer Science (IJETTCS), 3(5): 147-153.
[50] Aswin, R.B., Jaleel, J.A., Salim, S. (2014). Hybrid genetic algorithm—Artificial neural network classifier for skin cancer detection. In 2014 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), Kanyakumari, India, pp. 1304-1309. https://doi.org/10.1109/ICCICCT.2014.6993162
[51] Yu, L., Chen, H., Dou, Q., Qin, J., Heng, P.A. (2016). Automated melanoma recognition in dermoscopy images via very deep residual networks. IEEE Transactions on Medical Imaging, 36(4): 994-1004. https://doi.org/10.1109/TMI.2016.2642839
[52] Mahbod, A., Schaefer, G., Wang, C., Ecker, R., Ellinge, I. (2019). Skin lesion classification using hybrid deep neural networks. In ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK, pp. 1229-1233. https://doi.org/10.1109/ICASSP.2019.8683352
[53] Dorj, U.O., Lee, K.K., Choi, J.Y., Lee, M. (2018). The skin cancer classification using deep convolutional neural network. Multimedia Tools and Applications, 77(8): 9909-9924. https://doi.org/10.1007/s11042-018-5714-1