Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 320 https://internationalpubls.com Nonlinear Analysis in Skin Cancer Detection: Customized Convolutional Neural Networks Approach Deepak Mane, Sangita Jaybhaye, Atharva Sawleshwarkar, Shraddha Shaha, Farhan Shaikh, Pratik Yeole 1,2,3,4,5,6Vishwakarma Institute of Technology, Pune, Pune-411037, Maharashtra, India deepak.mane@vit.edu sangita.jaybhaye@vit.edu atharva.sawleshwarkar20@vit.edu shraddha.shaha21@vit.edu farhan.shaikh20@vit.edu pratik.yeole20@vit.edu Article History: Received: 26-03-2024 Revised: 09-05-2024 Accepted: 22-05-2024 Abstract: Skin cancer is a common and possibly fatal illness, emphasizing the critical importance of early detection for effective treatment. Convolutional Neural Networks (CNNs) have become effective methods for automating the detection of skin cancer in recent years. This paper proposed a novel approach to skin cancer detection, aiming to develop a robust classification system which will be able to differentiate between skin lesions with different types. The HAM10000 dataset contains a total of 10,015 images of different skin lesions. There are 7 different kinds of skin cancer photos in this collection, each sized 450x600 pixels with three color channels. To address class imbalance, oversampling was applied, and data augmentation was used to reduce the risk of model overfitting. Our proposed model comprised a customized CNN model, including convolutional layer, input layer, batch normalization layer, max-pooling layers and many more. Additionally, we utilized a customized MobileNet model incorporating various layers, such as dense layer, flattened layer, dropout layer, etc, to predict the disease precisely. Training optimization involved a learning rate reduction strategy using callbacks. Comprehensive model evaluation, utilizing various techniques, yielded an accuracy of 98.5% for the CNN model and 92% for the MobileNet model Keywords: Convolutional Neural Network (CNN), MobileNet, Deep Learning, Skin Cancer, pattern classification. 1. INTRODUCTION Skin cancer is a common and potentially fatal malignancy that affects millions of individuals worldwide. It encompasses various subtypes, including basal cell carcinoma, melanoma, and squamous cell carcinoma, each presenting distinct challenges in terms of diagnosis and treatment. Among these, melanoma stands out as the most aggressive form, known for its rapid progression and high metastatic potential. Timely detection of skin cancer plays a pivotal role in reducing morbidity and mortality rates associated with the disease. Conventional diagnosis heavily relies on the expertise of dermatologists who conduct visual examinations and employ dermoscopy, a non-invasive imaging method for evaluating lesions. While these methods have been fundamental in identifying suspicious lesions, the accuracy of diagnosis remains subjective, contingent upon the clinician's experience, and sometimes constrained by limited access to specialized care [1]. mailto:deepak.mane@vit.edu mailto:atharva.sawleshwarkar20@vit.edu mailto:shraddha.shaha21@vit.edu mailto:farhan.shaik20@vit.edu mailto:pratik.yeole20@vit.edu Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 321 https://internationalpubls.com In recent years, the convergence of substantial advancements in the analysis of medical imaging and the availability of expansive dermatoscopic image datasets has sparked significant interest in the incorporation of AI methods for spotting skin cancer. CNN, a class of deep learning models, in particular, have shown a remarkable potential in addressing the complexities of dermatoscopic image analysis. CNNs excel in their ability to automatically extract intricate and hierarchical features from raw image data, making them ideally suited for identifying subtle patterns indicative of skin cancer [2]. The objectives of our system is: ● Evaluate diagnostic accuracy and compare performance to existing methods. ● Investigate the reduction of false positives in skin cancer detection. ● Assess scalability and real-world applicability on diverse datasets. ● Evaluate the user-friendliness and speed of the system's interface. The research paper is organized into seven sections: Introduction (Section I) provides context and motivation. Background and motivation (Section II) offers a deeper exploration of the research context. Related work (Section III) reviews prior research. Research gap and objectives (Section IV) defines study goals. Materials and methods (Section V) explains data and techniques. Results and discussions (Section VI) present findings and analysis. Conclusion and future scope (Section VII) summarizes results and outlines future research directions. 2. BACKGROUND AND MOTIVATION Despite the significant advancements in medical image analysis and the availability of dermatoscopic imaging techniques, the accurate and timely Skin cancer diagnosis, including non-melanoma and melanoma skin cancers, is still a difficult task. The current reliance on subjective clinical assessments and dermatoscopy, which are highly dependent on the expertise of dermatologists, presents limitations in terms of diagnostic accuracy and accessibility to specialized care. Furthermore, the global prevalence of skin cancer demands innovative solutions to expedite the detection process and reduce the burden on healthcare systems [3]. To address these challenges, this research paper aims to leverage the potential of Convolutional Neural Networks in the realm of dermatoscopic image analysis for skin cancer detection. The primary objective is to design, develop, and rigorously evaluate a CNN-based model capable of accurately detecting skin cancer lesions. This model seeks to reduce diagnostic subjectivity, enhance the accessibility of skin cancer diagnosis, and contribute to the global efforts to improve early detection, thereby minimizing the morbidity and mortality associated with this widespread disease [4]. A. Skin Cancer Types: (i) Melanoma: It is a highly malignant skin cancer type that develops in melanocytes, the cells that produce pigment. It is known for its potential to metastasize, making early detection crucial. (ii) Melanocytic Nevus: Melanocytic nevi, often referred to as moles, are common benign skin growths characterized by a cluster of melanocytes. They come in various shapes and colors. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 322 https://internationalpubls.com (iii)Basal Cell Carcinoma: The most common form of skin cancer is basal cell carcinoma. It typically arises in the basal cells of the epidermis and is generally slow-growing, with a low risk of metastasis. (iv) Actinic Keratosis: Actinic keratosis is a precancerous skin condition resulting from sun damage. It appears as scaly or crusty patches and can develop into squamous cell carcinoma if left untreated. (v) Benign Keratosis: Benign keratosis are non-cancerous skin growths often caused by excess keratin. They can take various forms, such as seborrheic keratosis, and are generally harmless. (vi) Dermatofibroma: Dermatofibromas are usually benign skin lesions originating in fibroblasts. They manifest as firm, brownish nodules and are typically non-threatening. (vii) Vascular Lesion: Vascular lesions involve abnormalities in blood vessels within the skin. They can include conditions like hemangiomas and port-wine stains, which are usually non- cancerous but may require medical attention. B. Dermatoscopy: Dermatoscopy, also known as dermoscopy, is a pivotal tool in dermatology, allowing for the magnified visualization of skin lesions. It enables clinicians to assess pigment patterns, vascularization, and architectural features, providing valuable insights for accurate diagnosis. Dermatoscopy has significantly improved diagnostic accuracy, extending beyond what is preciviable to the normal eye. C. Deep Learning and CNNs: Machine Learning is a superset of Deep learning that has brought about revolutionary transformations in various fields, including medical imaging and health care. CNNs, as a category of deep neural network architectures, have gained prominence for their exceptional performance in image analysis tasks. Comprising convolutional and pooling layers, CNNs excel at automatically learning complex features from raw image data, rendering them well-suited for the analysis of dermatoscopic images. D. MobileNet: MobileNet is a lightweight convolutional neural network model, primarily designed for resource- constrained and efficient environments, like embedded systems and mobile devices. It achieves remarkable performance by utilizing depth-wise separable convolutions, which significantly reduce the model's computational complexity and memory footprint while preserving accuracy. MobileNet's modular structure allows for easy customization and adaptation to various tasks, making it an attractive choice for real-time image classification and object detection applications in resource- constrained scenarios. 3. RELATED WORK The ability to classify skin tumors from photographs has increased deamatically in past years. Over the years, a lot of deep learning approaches have been studied and attempted. The 2018 International Skin Imaging Collaboration (ISIC) event, which featured a challenge contest, has evolved into a de Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 323 https://internationalpubls.com facto standard for skin cancer screening. [1]. Even the images taken through mobile phones are capable enough to get tested for convolutional neural networks (CNN)[1]. CNN basically mimics human visual cognition systems and is the one of the best ways to recognise images with the help of computer vision. M. Acosta et.al. have suggested a technique based on CNN mask and ResNet152. The suggested procedure consists of two stages: a first stage that uses area of interest in dermatoscopic images by cropping it, this technique uses mask and region based CNN, and a second stage that classify lesions into ‘benign’ and ‘malignant’ and uses ResNet52 to classify it[2]. Proposed model by M.F.J. Acosta et. al. reported highest specificity of 96% and maximum accuracy of 90.4% for six different testing models. Finally, With a better ratio between overall accuracy, sensitivity and specificity calculated 0.82, 0.904 and 0.925 respectively, the eVida M6 model is a dependable predictor. [2]. Esteva et al. made significant progress in the categorization of skin cancer using a pre-trained GoogLeNet Inception V3 CNN model [3]. Author M. Kadampur et. al had worked on five different CNN models and tested on the HAM10000 dataset. They acquired accuracy of CNN models about 94% on HAM10000. H. Balaha et. al. have tried about eight different models like VGG16, VGG19, MobileNet MobileNetV3, MoblineNetV3Large, MobileNetV3Small and reported a maximum of 98% accuracy [4]. The accuracy of 98% is successfully reported by author H. Balaha et.al. using MobileNet. M. Tahir et.al.proposedDSCC_Net based skin cancer detection on standerted HAM10000 dataset and acquired a maximum of 92% accuracy [5]. They used different CNN models to detect skin cancer classes like VGG19, Alex-Net, VGG16, ResNet50, EfficientNetB0-B7, D-CNN and many more. A study comparing deep neural networks and convolutional neural networks was proposed by S. Albawi1 et al. "International Skin Imaging Collaboration" released a dataset of skin cancer dermatoscopic images to public. Authors used this dataset for training and testing purpose of their model. Dataset consists of about 6400 images, in which for training and testing purpose, data was split into the ratio of 80:20 [6]. With this 80:20 training-testing ratio S. Albawil et.al concluded about 98.5% accuracy on their dataset. The layers incorporated in CNN models were effective in their case. By changing the training-testing ratio they got accuracy of CNN models varying from 60% to 98% [6]. MobileNet Convolutional Neural Network implementation by S. Chatuvedi et al. was pretrained on 12,80,000 pictures with 1000 item types [7]. They used transfer learning methods to train models with a total 38,569 images. They used batch size of 10 and epoch 50 [7]. They have reported maximum accuracy of 95.34%.[7]. K.Ali et.al. trained EfficientNet B0-B7 on HAM10000 dataset [8] and achieved maximum accuracy of 87.91%. According to their findings, higher accuracy is not always implied by increasing model accuracy [8]. The most accurate models among the B0-B7 range are the B4 and B5 models, which have intermediate complexity. A. Nugroho et.al. implemented 9 layered CNN to identify cancer classes in HAM10000 dataset. They split a dataset of 10015 images into train dataset, validation dataset and test dataset each one consists of 7212, 2003 and 800 images respectively [9]. They achieved accuracy of maximum 80% with input image size of 90 x 120 pixels [9]. A. Tajerian et.al. reported maximum accuracy of 84% on detecting skin cancer in HAM10000 dataset. They employed EfficientNET-B0, a variation of the Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 324 https://internationalpubls.com base model, and EfficientNET-B1. It was covered by a 7-node softmax layer and a 2D global average pooling layer. [10]. Alam TM et.al. implemented 3 different models AlexNet, InceptionV3 and RegNetY-V3. HAM10000 dataset was used to train these models and finally they gained maximum accuracy of 91%[11]. They used augmentation methods like scaling, rotation, etc to balance an imbalanced HAM1000 dataset. Also reducing learning rate from 0.01 to 0.001 helped authors to increase accuracy of model RegNetY-V3 to 91% [11]. M. Deepak et.al. addresses the high melanoma mortality rate by emphasizing the need for early skin lesion identification. It introduces a classification framework using MobileNet and transfer learning to accurately categorize eight skin lesion types. The approach, validated with the ISIC 2019 dataset, holds promise for improving early diagnosis and treatment precision, benefitting both patients and dermatologists [12]. D. Keerthana et.al. introduces two hybrid CNN models with an SVM classifier for dermatoscopy image classification. By combining features extracted from these models, it enhances the accuracy of benign and melanoma lesion differentiation. Expert dermatologist-labeled data is utilized to validate the model's performance [13]. K. Mridha et. al. used an optimized form of CNN to identify 7 types of skin cancer. Relu, Swish, Tanh, were the three activation functions and Adam and RMSProp two optimization functions that were used to train the model [14]. Additionally, the Grad-CAM and Grad-CAM ++ skin lesion classification system based on XAI was embedded by the authors[14].. The system was able to accurately detect cancer with an accuracy of 82%. Incorporating AI models into the diagnosis system can help the entire spectrum of doctors to identify skin cancer. But if faulty AI is incorporated then it can lead to potential misdiagnosis and can cause great harm [15]. So, while implementing this technology we need to be 100% sure that it works correctly. 4. RESEARCH GAP While the potential of CNNs in skin cancer detection is well-established, comprehensive research focused on the development, training, and evaluation of CNN-based models for dermatoscopic image analysis is warranted. This research paper addresses the gaps by presenting a detailed investigation into the design, training, and evaluation of a CNN based model for skin cancer detection using dermatoscopic images. By harnessing the capabilities of deep learning and large-scale image datasets, this study intends to support ongoing efforts to improve the efficacy and accuracy of skin cancer diagnosis, eventually increasing patient outcomes and lowering the global burden of this prevalent disease. 5. MATERIAL AND METHODS A. Dataset The research utilized the HAM10000 dataset, known as "Human Against Machine with 10000 training images." There are 10,015 skin lesions images in this dataset. capturing various skin lesions. It is divided into two primary subsets, consisting of a training set with 7,039 images and a test set containing 2,976 images. These images are commonly in JPEG format, displaying variations in Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 325 https://internationalpubls.com resolution, and encompass skin lesions captured from diverse angles and under varying lighting conditions. It is a multi-class dataset which classifies skin lesions into seven distinct categories based on different types of skin cancer. These categories include: 1. melanoma 2. melanocytic nevus 3. basal cell carcinoma 4. actinic keratosis 5. benign keratosis 6. dermatofibroma 7. vascular lesion The dataset features, along with their corresponding details, are shown in Table 1. Table 1: Features of Dataset Sr.No Feature Details 1 Image ID Unique identifier for each image 2 Patient ID Unique identifier for the patient associated with the image 3 Lesion ID Unique identifier for the skin lesion 4 Gender Gender of the patient 5 Age Age of the patient 6 Anatomical Site Location on the body where the skin lesion is located 7 Diagnosis Diagnostic class of the skin lesion Fig.1: Sample from HAM10000 The Fig.1 depicts the images sourced from 'HAM10000' dataset that we have used for developing our skin cancer detection system. The display comprises 5 rows and 10 columns filled with different types of skin lesion images. As previously indicated, the dataset encompasses 7 distinct categories of skin lesions. The displayed images possess a width of 12 units and a height of 6 units respectively. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 326 https://internationalpubls.com Table 2: Dataset description by classes Cancer Types Number of Images Percentage melanoma 1113 11.11% melanocytic nevus 6705 66.94% basal cell carcinoma 514 5.13% actinic keratosis 327 3.26% benign keratosis 1099 10.97% dermatofibroma 115 1.14% vascular lesion 142 1.41% The Table 2 depicts the number of pictures in the HAM10000 dataset for each of the 7 skin cancer classes: melanocytic nevus, melanoma, carcinoma, basal cell actinic keratosis, dermatofibroma, benign keratosis, and vascular lesion. The table also displays the percentage of images in each class. The table shows that the most prevailing skin cancer class in the following dataset is melanocytic nevus, which is a benign mole. The least common skin cancer class is vascular lesion. This clearly indicates that the dataset is imbalanced and needs oversampling to avoid any ambiguous and biased results. B. Tools and Libraries: The research utilizes various tools and libraries for implementing the models, training, and evaluation which includes: (i) Python: The primary programming language for its extensive ecosystem. (ii) TensorFlow and Keras: Employed for deep learning model development and training. (iii)Scikit-Learn: Utilized for data preprocessing and evaluation. (iv) Pandas and NumPy: Used for data manipulation and numerical computations. (v) Matplotlib and Seaborn: Chosen for data visualization. (vi) OpenCV: Applied for image preprocessing and augmentation. (vii) Scipy: Utilized for specialized statistical functions. (viii) H5py: Employed for efficient dataset storage. (ix) Google Colab: Utilized for cloud-based model training. (x) GitHub: Facilitated version control and collaboration. (xi) Additional Machine Learning Frameworks: Depending on specific tasks, frameworks like PyTorch and Scikit-Learn were incorporated as needed. C. Algorithms: Our approach involves using traditional CNN and advanced MobileNet architectures for skin lesion detection and prediction. 1. Convolutional Neural Network (CNN): CNN is a dl (deep learning) algorithm which is extensively used for picture classification tasks. In this research, a CNN is employed to classify skin lesions from the HAM10000 dataset. The CNN architecture is composed of following layers : (i) Input Layer: The input layer accepts images of size 28x28 pixels with RGB channels. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 327 https://internationalpubls.com (ii) Convolutional Layers: Multiple convolutional layers are employed to obtain features from the input images. These layers apply convolution operations to learn different patterns and features. (iii) Max-Pooling Layers: Max-pooling layers reduce the feature maps' spatial dimensionality, helping to retain essential information while reducing computational complexity. (iv) Batch Normalization Layers: Batch normalization is utilized to improve the convergence of the model during training. (v) Fully Connected Layers: After feature extraction, fully connected layers are employed to make predictions. These layers consist of densely connected neurons that produce output probabilities for each class. (vi) Flattened Layers:The flattened layer in a CNN plays a pivotal role in transforming the multi- dimensional feature maps from the preceding convolutional and pooling layers into a one- dimensional vector. This vector acts as the input for the subsequent fully connected layers, enabling the network to learn hierarchical patterns in the data. (vii) Dropout Layers: Dropout layers are introduced to prevent overfitting by randomly deactivating a fraction of neurons during training. (viii) Output Layer: The output layer consists of seven neurons (one for each class), and it uses softmax activation to produce class probabilities. 2. MobileNet: MobileNet is a lightweight deep learning architecture developed for embedded devices and mobile. In this research, a pre-trained MobileNet model is employed as an extractor of features from images for skin lesion classification. The model's architecture is modified to remove some layers and include additional layers for classification. Here is an overview of the MobileNet-based model: (i) MobileNet Feature Extractor: The MobileNet design is employed to extract relevant features from skin cancer images. The pre-trained MobileNet model has already learned a wide range of features from various images. (ii) Additional Layers: On top of the MobileNet feature extractor, new layers are added for classification purposes. These layers include a dense layer, flatten layer, dropout layer, and an output layer. The MobileNet-based model is fine-tuned using transfer learning, where the weights of the MobileNet layers are frozen, and only the additional layers are trained. The model is improved using the Adam optimizer, and categorical cross-entropy loss is used for training. Various metrics, such as categorical accuracy and top-k accuracy, are monitored during training. D. Mathematical Operation Used: In the course of this research, several fundamental mathematical operations were applied to facilitate the training and optimization of deep learning models. These operations are integral to Convolutional Neural Networks (CNNs) and are outlined below: 1. Convolution Operation: The convolution operation, a cornerstone of CNNs, is at the core of feature extraction from images. It entails computing the dot product between weights (filters) and local regions of the input image. The output of a convolutional layer is expressed as: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 328 https://internationalpubls.com (𝐼 ∗ 𝐾)(𝑥, 𝑦) = ∑ ⬚ 𝑁−1 𝑖=0 ∑ ⬚ 𝑁−1 𝑗=0 𝐼(𝑥 + 𝑖, 𝑦 + 𝑗) ⋅ 𝑘(𝑖, 𝑗) (1) Here, I represents the input image, K denotes the filter, and (x,y) signifies the spatial location. 2. Activation Function (ReLU): The Rectified Linear Unit (ReLU) serves as a widely adopted activation function in CNNs. Its primary role is to acquaint nonlinearity into the architecture, enabling it to capture complex patterns. Mathematically, the ReLU activation is defined as: 𝑓(𝑥) = 𝑚𝑎𝑥(0, 𝑥)(2) 3. Max-Pooling Operation: The mathematical equation for a max-pooling operation on an input feature map "𝑋" with dimensions 𝐻𝑥𝑊𝑥𝐶, using a window size of "𝐾𝑥𝐾" and a stride of "𝑆" to produce an output feature map "𝑌" with dimensions 𝐻𝑜𝑢𝑡𝑥 𝑊𝑜𝑢𝑡 𝑥 𝐶 is: 𝐻𝑜𝑢𝑡 = 𝑓𝑙𝑜𝑜𝑟((𝐻 − 𝐾)/𝑆) + 1 (3) 𝑊𝑜𝑢𝑡 = 𝑓𝑙𝑜𝑜𝑟((𝑊 − 𝐾)/𝑆) + 1 (4) For each element 𝑌[𝑖, 𝑗, 𝑐] in the output feature map, you take the maximum value from the corresponding window in the input feature map 𝑋: 𝑌[𝑖, 𝑗, 𝑐] = 𝑚𝑎𝑥(𝑋𝑤𝑖𝑛𝑑𝑜𝑤[𝑖,𝑗,𝑐]) (5) Here, "𝑋𝑤𝑖𝑛𝑑𝑜𝑤" is a sub-matrix of "𝑋" determined by the window parameters. This equation describes how each element in the output feature map "𝑌" is computed by finding the maximum value within the specified window in the input feature map "𝑋". 4. Batch Normalization: Batch normalization plays a pivotal role in normalizing layer activations, fostering training stability and acceleration. The batch normalization formula for a specific feature x in a mini-batch is: 𝐵𝑁(𝑥) = 𝛾 ( 𝑥−𝜇 𝜎 ) + 𝛽 (6) Here, μ represents the mean, σ stands for the standard deviation, γ signifies a learned scale parameter, β denotes a learned shift parameter. 5. Softmax Activation: In multi-class classification, the softmax activation function is instrumental in converting raw scores (logits) into class probabilities. The softmax function for K classes is articulated as: 𝑃(𝑦 = 𝑘/𝑧) = 𝑒𝑧𝑘 ∑ ⬚𝑘 𝑗=1 𝑒𝑧𝑗 (𝑓𝑜𝑟 𝑗 𝑖𝑛 𝑎𝑙𝑙 𝑐𝑙𝑎𝑠𝑠𝑒𝑠) (7) Where z_k signifies the logit for class k. 6. Categorical Cross-Entropy Loss: Categorical Cross-Entropy serves as a prevailing loss function for multi-class classification tasks. It quantifies the dissimilarity between predicted probabilities and actual one-hot encoded class labels. The categorical cross-entropy loss for a single example is calculated as: 𝐿(𝑦, 𝑝) = − ∑ ⬚𝑘 𝑖=1 𝑦𝑖⬚ 𝑙𝑜𝑔(𝑝𝑖) (8) Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 329 https://internationalpubls.com Here, y represents the one-hot encoded true label, while p signifies the predicted probability distribution. 7. Learning Rate (Optimizer): The learning rate (α) emerges as a pivotal hyperparameter governing the step size during optimization, such as gradient descent. Its selection often entails rigorous hyperparameter tuning to achieve optimal model convergence. 6. PROPOSED SYSTEM Fig.2: Proposed Methodology Several researchers have previously attempted to utilize various machine learning techniques for detecting skin cancer on the HAM10000 dataset. However, their results have fallen short when compared to the achievements of our study. In our methodology, we have structured the process into four distinct phases, as illustrated in Fig.2, where we implemented customized CNN and MobileNet models. The primary focus of our approach is to enhance accuracy and other performance parameters significantly, outperforming previous studies. For our customized MobileNet model, we adopted a specific strategy. We excluded the last five layers of the original MobileNet architecture, retaining layers up to 'global_average_pooling2d_1' to capture essential features. Also we introduced a 'Flatten' layer to convert the model's output into a one-dimensional tensor. Following this, we added a dense layer with 1024 units, applying ReLU activation to enhance feature extraction. To mitigate overfitting concerns, a dropout layer with a rate of 0.25 was incorporated. The final dense layer consisted of seven units, each corresponding to one of the skin cancer classes, and was equipped with a 'softmax' activation function. The success of this approach is demonstrated through a comprehensive performance evaluation, where we compared the Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 330 https://internationalpubls.com outcomes with existing methods. The detailed results and findings are extensively covered in our research paper. The detailed methodology is as follows: 1. Data Preprocessing and Splitting: (i) Dataset Loading: The initial step was to load the dataset, which accommodates images of various skin lesions associated with various types of skin cancer. (ii) Addressing Class imbalance: Then the issue of class imbalance was resolved by oversampling the minority classes using the RandomOverSampler from the imbalanced-learn library. This helped ensure that each class had a balanced representation in the training data. (iii)Data Augmentation:To expand the diversity of the training data and improve model generalization, we applied data augmentation techniques to the training images. This included random rotations, zooming, shifting, and flipping of images. We also augmented the dataset to achieve a total of 6,000 images for each class. (iv) Dataset Splitting:The dataset was splitted into training and validation sets, with 75% of the data used for training and 25% for validation. Before splitting, we converted the labels from numerical abbreviations to their corresponding class names for better interpretability. 2. Convolutional Neural Network (CNN) (i) Model Architecture: For the CNN model, Multiple convolutional layers were included in the deep convolutional neural network developed by us, which was then subjected to batch normalization and max-pooling.. The architecture included 3 convolutional blocks, each consisting of 2 convolutional layers with batch normalization and ReLU activation, followed by max-pooling. After the convolutional blocks, we added fully connected layers with dropout and batch normalization for regularization. The output layer had seven units, one for each skin cancer class, with a softmax activation function. Fig. 3: Model Summary CNN Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 331 https://internationalpubls.com Fig. 3 provides a short overview of the CNN-based model, generated using the model.summary() function. In our approach, we employed a sequential Keras model, meticulously incorporating all the above specified layers. This model architecture comprises 1 input layer, 7 convolutional layers, 4 max-pooling layers, 8 batch normalization layers, 1 flattened layer and dropout layer, 5 dense layers. We consistently applied the ‘ReLU’ activation function across all layers, except for the final layer, where we utilized the ‘softmax’ activation function. For initializing the model's kernel weights, we opted for the 'he_normal' initializer, and we maintained 'same' padding throughout the model. In terms of optimization, we selected the ‘Adamax’ optimizer, with a learning rate capped at 0.001, to enhance learning efficiency, the loss function was set to ‘cross- entropy’ and metrics used was ‘accuracy’. The Fig 3 provides insights into the trainable parameters, total parameters and non-trainable parameters employed in our model. This detailed description of the model architecture is crucial for comprehending the methodology employed in our research work. (ii) Training: With a learning rate of 0.001, we used the Adamax optimizer to train the CNN model across 25 epochs. Learning rate reduction is employed on a plateau, monitoring validation accuracy, to fine-tune the learning rate during training. The training history was visualized with plots showing training vs validation loss, accuracy, top2 and top3 accuracy. (iii)Model Evaluation:We evaluated the CNN model on the validation set and calculated metrics such as categorical, top2 and top3 accuracy. The best-performing model was selected based on the validation top-3 accuracy. Additionally, we created a confusion matrix to visualize the model's performance in classifying different types of skin lesions. 3. MobileNet (i) Model Architecture: For the MobileNet model, we utilized a pre-trained MobileNet architecture, excluding the last five layers. We added our custom layers, including a dense layer with ReLU activation and dropout, followed by the output layer with seven units for the skin lesion classes. Fig. 4: Model Summary MobileNet Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 332 https://internationalpubls.com Fig.4 shows some glimpse of the customized MobileNet model summary and architecture used in this research work. The model consists of a series of convolutional layers, depthwise separable convolutions, and pointwise convolutions, resulting in a lightweight yet powerful architecture. The model is designed for image classification tasks and has a total of 28,923,079 parameters. It includes 7 class output neurons and is trained to achieve high accuracy on a specific classification task. This compact model is suitable for resource-constrained environments and offers competitive performance for the given task. (ii) Training:We fine-tuned the MobileNet model by freezing all layers except the last 23 layers. With a 0.01 learning rate, we used the Adam optimizer to construct the suggested architecture and applied class weights which made the architecture more sensitive to melanoma, which is an important skin cancer type. We trained the model for 10 epochs and used callbacks to save the best model based on validation top-3 accuracy. (iii)Model Evaluation: MobileNet evaluation was done on the basis of the validation set and reported metrics including categorical, top2 and top3 accuracy. 4. Model Comparison and Visualization: We performed a comparison of the performance of both the CNN and MobileNet models using metrics such as validation loss and accuracy. We also visualized the training curves to understand how the models learned over epochs. Additionally, we created confusion matrices to visualize the models' performance in classifying different skin cancer types. 7. RESULTS AND DISCUSSIONS Year & Reference Method Accuracy Aug 2022 [11] AlexNet 76% Aug 2022 [11] InceptionV3 77% DEC 2019 [9] CNN 78% Aug 2022 [11] RegNetY-320 85% July 2022 [12] MobileNet 83% Dec 2021 [8] CNN 87.9% April 2023 [10] CNN 91.77% 2023 (Proposed Methodology) MobileNet 92.21% 2023 (Proposed Methodology) CNN 98.52% Table 3: Comparison with existing system The comparison between the outcomes of previous methods and the proposed methodology presented in Table 3 shows a clear trend of improving image classification accuracy over the time. In previous methodologies, up until 2022, models such as AlexNet, InceptionV3, RegNetY-320, and MobileNet achieved accuracy scores ranging from 76% to 85%. In the same period, CNNs achieved an accuracy of 78% in December 2019 and 87.9% in December 2021. These results indicate a steady but relatively moderate progression in accuracy over time. However, the proposed methodology, as of 2023, has demonstrated a substantial leap in accuracy. MobileNet, attained an amazing accuracy of 92.21% under the suggested methodology, while CNN achieved an even higher accuracy of 98.52%. This suggests that the proposed methodology has made Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 333 https://internationalpubls.com significant advancements in image classification accuracy, outperforming the earlier models by a considerable margin. Skin Cancer Classes Precision Recall F1-Score No. of Image melanocytic nevi (nv) 1 1 1 1667 melanoma (mel) 1 1 1 1689 benign keratosis-like lesions (bkl) 0.97 1 0.98 1651 basal cell carcinoma (bcc) 1 1 1 1629 pyogenic granulomas (vasc) 0.99 0.91 0.95 1663 Actinic keratoses (akiec) 1 1 1 1680 dermatofibroma (df) 0.95 0.99 0.97 1755 Table 4: Classification Report Table 4 presents the classification report for individual skin cancer classes, showcasing the performance of our CNN-based skin cancer prediction model across diverse categories. It indicates that the model demonstrates exceptional accuracy in classifying various skin cancer types, with high precision, recall, and F1-scores. This outcome is highly promising, as it suggests that the model accurately identifies different types of skin lesions, acritical step in early skin cancer detection. The overall performance metrics of the presented system: 1. F1 Score - 0.9846: This score indicates a high balance between precision and recall, highlighting the system's strong accuracy in classification. 2. Recall - 0.9847:The system effectively identifies a large portion of relevant instances, making it highly reliable. 3. Precision - 0.9850: This reflects the system's ability to make accurate positive predictions, showing a low rate of false positives. 4. Accuracy - 0.9850: The system's overall correctness in classification is exceptional, making it a highly dependable tool. Further details on the results and discussions are as follows: 1. CNN: The CNN model's accuracy is 98.52%. The model is trained using a 128-batch size across 25 epochs. In order to improve the model's correctness, we are here decreasing the learning rate in comparison to the current system. Accuracy was employed as the performance evaluation parameter during testing on the test dataset,where 11734 pictures were utilized for testing from 35201 photos from the skin cancer dataset were used for training after employing oversampling on the dataset. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 334 https://internationalpubls.com Fig. 5 (a) Training and validation loss Fig. 5 (a) illustrates the loss vs epoch graph of the system which shows that the model is generalized effectively to new data with a high level of accuracy. The best epoch of the model is epoch 12, with a validation loss of 0.25. Fig. 5 (b) Training and validation accuracy Fig. 5 (b) illustrates the Accuracy vs epoch graph of the system which shows that the model is generalized effectively to new data with a high level of accuracy (98.5% validation accuracy). The best epoch of the model is epoch 19. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 335 https://internationalpubls.com Fig. 5 (c) confusion matrix Fig. 5 (c) depicts the confusion matrix of the represented system which shows that the system has a high level of accuracy in detecting skin cancer (98.5%). The system is particularly good at detecting malignant lesions (precision: 99.2%, recall: 98.6%), and also good at detecting benign lesions (precision: 97.6%, recall: 97.8%). Overall F1-Score, Recall and Precision of the system is 0.9851, 0.9853, 0.9855Overall, the skin cancer detection system is a highly accurate and reliable system. 1. MobileNet: Fig 6.(a) Training vs validation loss Fig 6.(a) depicts the training vs validation loss graph of the mobilenet model architecture of the system. It shows that the model is well-trained and has good generalization performance. The validation loss decreases rapidly over the first few epochs and then plateaus at a relatively low level and then again decreases. Nevertheless, the overall reduction between training and validation loss is relatively small, indicating that the model is able to generalize well to new data. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 336 https://internationalpubls.com Fig 6.(b) Training vs validation cat accuracy Fig 6. (b) depicts the training vs validation categorical accuracy of the MobileNet model. The graph shows that the MobileNet model is learning to classify cat images with a high degree of accuracy, as the validation cat accuracy reaches a high percentage. The model could be used to develop reliable cat classification applications. Fig 6.(c)Training vs validation top2 accuracy Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 337 https://internationalpubls.com Fig 6.(d) Training vs validation top3 accuracy Fig 6.(c) and Fig 6.(d) illustrate the MobileNet model's training vs validation top2 and top3 accuracy throughout the epochs. The validation accuracy is always greater than the training accuracy, showing that the model is learning to perform well on validation data. This is a good indicator because it indicates that the model can learn the patterns in the data. 8. CONCLUSION AND FUTURE SCOPE In this study, we developed an effective skin lesion detection system using CNN and MobileNet. Our customized CNN achieved a remarkable accuracy of 98.52%, showcasing its capability to generalize well to new data. The fine-tuned MobileNet model also displayed promising results, further expanding the horizons of dermatoscopic image analysis for skin cancer detection. Our findings reflect a significant potential in the efficiency of the skin lesion diagnosis by increasing the accuracy of the system. The future may hold some exciting possibilities for the advancement of skin cancer detection: (i) Real-time Detection: Developing mobile applications with these models can provide quick and accurate skin cancer assessments, benefiting both patients and medical professionals. (ii) Cross-Domain Applications: The techniques and methodologies developed for skin cancer detection can potentially extend to other medical image analysis tasks, broadening the impact of this research. REFERENCE [1] Mohommad Kadampur, "Skin cancer detection Applying a deep learning based model driven architecture in the cloud for classifying dermal cell images," Elsevier Enhanced Reader. Informatics in Medicine Unlocked, 18, 2020. doi: 10.1016/j.imu.2019.100282. [2] M.F. Jojoa Acosta, L.Y. Caballero Tovar, M.B. Garcia-Zapirain, "Melanoma diagnosis using deep learning techniques on dermatoscopic images," BMC Med Imaging, 21, 6, 2021. doi: 10.1186/s12880-020-00534-8. [3] A. Esteva, B. Kuprel, R. Novoa, et al., "Dermatologist-level classification of skin cancer with deep neural networks," Nature, 542, 115–118, 2017. doi: 10.1038/nature21056. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 31 No. 2s (2024) 338 https://internationalpubls.com [4] H.M. Balaha, A.ES. Hassan, "Skin cancer diagnosis based on deep transfer learning and sparrow search algorithm," Neural Comput&Applic, 35, 815–853, 2023. doi: 10.1007/s00521-022-07762-9. [5] Maryam Tahir, Ahmad Naeem, Hassaan Malik, Jawad Tanveer, Rizwan Naqvi, Seung-Won Lee, "DSCC_Net: Multi-Classification Deep Learning Models for Diagnosing of Skin Cancer Using Dermoscopic Images," Cancers, 15, 2179, 2023. doi: 10.3390/cancers15072179. [6] S. Albawi, M.H. Arif, J. Waleed, "Skin cancer classification dermatologist-level based on deep learning models," ActaScientiarum. Technology, 45(1), e61531, 2022. doi: 10.4025/actascitechnol.v45i1.61531. [7] Saket Chaturvedi, Kajol Gupta, Prakash Prasad, "Skin Lesion Analyser: An Efficient Seven-Way Multi-Class Skin Cancer Classification Using MobileNet," 2019. [8] Karar Ali, Abdullah Ayub Khan, Asif Laghari, Zaffar Shaikh, "Multiclass Skin Cancer Classification using EfficientNets -A First Step towards Preventing Skin Cancer," Neuroscience Informatics, 2, 2021. [9] ArdanAdiNugroho, IsnandarSlamet, Sugiyanto, "Skins cancer identification system of HAMl0000 skin cancer dataset using convolutional neural network," AIP Conf. Proc., 2202 (1), 020039, 2019. [10] A. Tajerian, M. Kazemian, M. Tajerian, A. AkhavanMalayeri, "Design and validation of a new machine-learning- based diagnostic tool for the differentiation of dermatoscopic skin cancer images," PLoS One, 18(4), e0284437, 2023. doi: 10.1371/journal.pone.0284437. [11] T.M. Alam, K. Shaukat, W.A. Khan, I.A. Hameed, L.A. Almuqren, M.A. Raza, M. Aslam, S. Luo, "An Efficient Deep Learning-Based Skin Cancer Classifier for an Imbalanced Dataset," Diagnostics, 12(9), 2115, 2022. doi: 10.3390/diagnostics12092115. [12] Deepak Mane, Rashmi Ashtagi, Prashant Kumbharkar, Sandeep Kadam, DipmalaSalunke, Gopal Upadhye, "An Improved Transfer Learning Approach for Classification of Types of Cancer," Traitement du Signal, 39, 2095- 2101, 2022.doi:10.18280/ts.390622. [13] KeerthanaDuggani, VipinVenugopal, Malaya Kumar Nath, Madhusudhan Mishra, "Hybrid convolutional neural networks with SVM classifier for classification of skin cancer," Biomedical Engineering Advances, 5, 100069, 2023.doi: 10.1016/j.bea.2022.100069. [14] Krishna Mridha, Md Uddin, Jungpil Shin, Susan Khadka, "An Interpretable Skin Cancer Classification Using Optimized Convolutional Neural Network for a Smart Healthcare System," 2023. [15] Philipp Tschandl, Noel Codella, Allan Halpern, Susana Puig, ZoiApalla, Christoph Rinner, Peter Soyer, Cliff Rosendahl, JosepMalvehy, Iris Zalaudek, Giuseppe Argenziano, Caterina Longo, Harald Kittler, "Human–computer collaboration for skin cancer recognition," Nature Medicine, 26, 2020. doi: 10.1038/s41591-020-0942-0. [16] Romaguera, S., "Hu's characterization of metric completeness revisited", (2022) Advances in the Theory of Nonlinear Analysis and its Applications, 6 (4), pp. 476-480. [17] Ibrahim, A., Bala, S.I., Ahmed, I., Ibrahim, M.J., Jarad, F., "Numerical Construction of Lyapunov Functions Using Homotopy Continuation Method" (2022) Advances in the Theory of Nonlinear Analysis and its Applications, 6 (3), pp. 354-363. [18] P. Deshpande, R. Dhabliya, D. Khubalkar, P. A. Upadhye, K. A. Wagh and V. Khetani, "Alzheimer Disease Progression Forecasting: Empowering Models Through hybrid of CNN and LSTM with PSO Op-Timization," 2024 International Conference on Emerging Smart Computing and Informatics (ESCI), Pune, India, 2024, pp. 1-5, doi: 10.1109/ESCI59607.2024.10497309.