Artificial intelligence-driven enhanced skin cancer diagnosis: leveraging convolutional neural networks with discrete wavelet transformation

Background Artificial intelligence (AI) has shown great promise in the field of healthcare as a means of improving the diagnosis of skin cancer. The objective of this research is to enhance the precision and effectiveness of skin cancer identification by the incorporation of convolutional neural networks (CNNs) and discrete wavelet transformation (DWT). Making use of AI-driven techniques has the potential to completely transform the diagnosis process by providing quicker and more accurate evaluations of skin lesions. In an effort to improve dermatology and give physicians reliable resources for early and precise skin cancer diagnosis, this work explores the combination of CNNs with DWT. Methods The accurate and timely classification of skin cancer lesions plays a crucial role in early diagnosis and effective treatment. In this, we propose a novel approach for skin cancer classification using discrete wavelet transformation (DWT). The DWT is employed to extract relevant features from skin lesion images, which are then used to train a classification model. The effectiveness of the suggested approach is assessed through the examination of a dataset of skin lesion images with known classes (malignant or benign). Results The outcomes of the experiment demonstrate that the suggested model successfully attained a classification result of sensitivity as 94% and specificity as 91% when compared with artificial neural network (ANN) and multi-layer perceptron methods. Conclusions The HAM 10000 dataset is employed to explore and evaluate the effectiveness of the proposed model, leading to improved accuracy compared to the existing machine learning algorithms in utilization. The results demonstrate the effectiveness of the DWT-based approach in accurately classifying skin cancer lesions, thus aiding in early detection and diagnosis.


Introduction
Skin cancer is the name for the abnormal cell proliferation that occurs in the body as a result of deoxyribo nucleic acid (DNA) damage [1].Hypodermis (innermost layer), Dermis (middle layer), and Epidermis (outermost layer) are the three layers where skin cancer may develop [2].The most dangerous types of skin cancer, known as benign and malignant tumors, can cause death [3].Malignant cancer can be fatal and spreads quickly into the skin layer.The benign cancer has a higher survival rate and weighs less [4].Dermatoscopes, which provide illuminated and magnified skin images, are the most effective method of detecting skin cancer.This technique provides better visual effect of detailed region of interest (ROI) of obtained lesions via the surface reflection [5].Fortunately, when the skin cancer is identified at the earlier stage, the diagnosis and the treatment may respond more [6].
In recent years, computer-aided diagnosis systems have emerged as valuable tools to assist dermatologists in skin cancer classification [7].These systems leverage advanced image processing and machine learning techniques.To derive significant characteristics from images of skin lesions and subsequently categorize them as either benign or malignant, one such technique that has shown promise is the discrete wavelet transformation (DWT) [8].The skin cells are harmed by both the global climate change and the sun's ultraviolet (UV) radiation [9].Skin cancer will form from the damaged cells that could not be healed.The worldwide skin cancer resides in the top three positions of leading death cancer.Skin cancer deaths have increased during the past few decades.Therefore, early disease classification and prediction are essential for the patient's life.The method that automatically detects skin lesions is automated using artificial intelligence approaches [10].The convolutional neural network (CNN), which is based on deep learning, more closely approaches the evidence for automatic skin cancer recognition [11].The discrete wavelet transformation (DWT)-based features extraction techniques used with CNN for skin cancer classification in this suggested method [12].By integrating DWT-based feature extraction techniques with CNNs for skin cancer classification offer a powerful framework for leveraging multiscale information, reducing dimensionality, enhancing robustness to noise, improving interpretability, enabling transfer learning, and achieving high-performance results in medical image analysis applications.
By leveraging the power of DWT for feature extraction and classification, accurate and timely diagnosis can be achieved, ultimately leading to improved patient outcomes, reduced healthcare costs, and enhanced clinical decision-making [13].
The most difficult problem in medical image processing is the early diagnosis of skin cancer.There are numerous methods for detecting skin cancer.Machine learning techniques like K-Means and fuzzy-C-Means are used to prevent incorrect predictions [14].To locate the different types of skin cancer, this approach needs the initial clusters as an input [15].
Recent years have seen the implementation of hierarchical approaches, conditional random fields (CRF), Random Forest (RF), and Markov Random Fields (MRF) to detect skin cancer.In a genuine dermatoscopic image, these two techniques are most frequently utilized for volatile intensity variation [16].The k-nearest neighbor algorithm is used to find the cancer similarity index.The RF operates on randomly chosen data points from the decision tree [17].A detection technique based on K-Means and Particle Swarm Optimization (PSO) was created by Praveen et al.In this case, identification is performed using the k-means classification algorithm and the optimization of inheriting the theorized PSO version [18].
Using KNN (K-Nearest Neighbors) and RF (Random Forest), Murugan et al. implemented the categorization of various forms of skin cancer [19].This approach has demonstrated very poor image illumination and precision.SVM-based skin cancer detection systems with KNN and RF algorithms were developed by Mane et al. [20] and Patel et al. [21].The approaches used to identify cancer today were manually created using features from doing classification [22].These features call for increased computation and storage.The DWT features are stripped to prevent this.Using CNN algorithms, all of the collected features are categorized [1].
Utilizing deep learning for the early identification of skin cancer has shown remarkable success in various computer vision challenges, surpassing the performance of human specialists [1,22].As a result, this technology has contributed to lowering the death rates associated with skin cancer.By incorporating efficient formulations into deep learning techniques, it becomes feasible to achieve exceptional cutting-edge processing and categorization accuracy [23][24][25].
In a previous investigation [26], the classification of skin disorders was executed by employing an edge detection technique in conjunction with K-NN and C-NN algorithms.The outcomes indicated accuracies of 75% and 75.6%, respectively, in effectively discriminating between potentially benign skin conditions and those that might have the potential to develop into malignant cancer.This categorization was conducted using the dataset from the International Skin Imaging Dataset Collaboration (ISIC).
In study [27], a skin disease classification system was created using the ISIC dataset to differentiate between skin cancer and skin benign tumors.The system utilized deep learning with the PNASNet-5-Large architecture, achieving an outstanding performance accuracy of 76%, signifying its effectiveness in accurately identifying and classifying skin diseases.
Additionally, several other studies [28][29][30] have employed CNN for skin disease detection, yielding notable performance accuracies of 80.52%, 86.21%, and 87.25%, respectively.These results demonstrate the effectiveness of CNN-based approaches in accurately identifying and diagnosing various skin diseases.
In order to improve the efficiency of the skin cancer detection system and expand the available data, researchers conducted an ISIC data augmentation process [31].By augmenting the dataset, they aimed to increase the diversity and quantity of the training data, leading to potential improvements in the system's accuracy and effectiveness in detecting skin cancer.In the research [32], utilizing the CNN approach with random modifiers, an impressive accuracy of 97.49% was attained in effectively differentiating distinct skin disorder lesions, encompassing nevus lesions, carcinomas, and melanomas.Moreover, the study reported that the highest accuracy of 95.91% was attained using the AlexNet architecture, showcasing its efficiency in skin disorder classification.
Furthermore, there is a lack of research published on the application of the softmax function using the CNNbased discrete wavelet transform (DWT) method.Hence, this current research aims to explore and investigate the novelty and research potential of employing DWT.The application of the softmax function using CNN-based discrete wavelet transform contributes to accurate, interpretable, and probabilistic skin cancer classification.By combining the strengths of DWT-enhanced feature extraction with softmax-based probability estimation, the model can provide reliable predictions, facilitate clinical decision-making, and enhance the overall effectiveness of computer-aided diagnostic systems in dermatology.The study focuses on experimentally evaluating the performance measures and values obtained through the DWT method, contributing to the enhancement of research quality in this domain.The current work focuses on the CNN-based DWT using softmax function to classify the skin cancer lesions to early detect and diagnose by using the HAM 10000 dataset, and ISIC 2018 dataset using Softmax function is used to investigate and assess the performance of the suggested model, which yields higher accuracy compared to the performance of the machine learning algorithms currently in use.The dataset encompasses a range of skin types, captures a variety of lesions across different age groups, and offers insights into dermatological conditions that may aid in the development of robust machine learning models for skin cancer classification.Although not fully representative of the entire global population, the HAM10000 dataset serves as a valuable resource for research and advancements in dermatology and computer-aided diagnosis.The HAM10000 dataset, abbreviated for "Human Against Machine with 10000 training images, " is utilized widely.It has the potential to become a benchmark dataset for future comparisons between human and machine performance.
The results demonstrate the effectiveness of the DWTbased approach in accurately classifying skin cancer lesions, thus aiding in early detection and diagnosis.

Related works
In recent years, there has been a notable surge in the application of diverse deep learning algorithms to effectively classify skin cancer.Table 1 outlines the array of methods utilized for predicting cancer, showcasing the advancements made in this field.
Efficient screening and forecasting play a pivotal role in increasing the likelihood of administering proper medication and reducing mortality rates associated with skin cancer.Nevertheless, many studies have primarily concentrated on applying deep learning models directly to raw images, disregarding the potential benefits of using preprocessed images.This approach limits the classification network's ability to adapt effectively.This approach enhances the model's adaptability and potential for more accurate predictions, thereby contributing to improved patient outcomes.

Proposed system
Based on DWT and CNN methodologies, this study offered an accurate skin cancer detection system.The definition of the skin cancer dataset, preprocessing of the cancer images, feature extraction from the DWT, CNN classification, and performance evaluation are its five primary stages.Figure 1 shows the overall architecture of the suggested technique, and the following subsections go into more detail.The pre-processing steps for the images are listed as follows, The input images are preprocessed; thereby, it reduces the extra noises that occur in the image.This image is trained and tested to find the fitness and to evaluate the model.In the training process of convolutional neural networks (CNNs), the feature extractor is automatically learned instead of being manually implemented.The feature extractor in a CNN is composed of specialized neural networks that determine their weights through the training process.This means that instead of handcrafting specific features, the CNN learns to identify important patterns and features directly from the data during training.As the network undergoes training on a labelled dataset, it adjusts its internal parameters, allowing it to automatically extract and recognize relevant features from the input data.This capability is one of the key advantages of CNNs, enabling them to perform well in various computer vision tasks, such as image classification, object detection, and segmentation.

Definition of skin cancer dataset
ISIC 2018 dataset is used to construct the suggested algorithm for detecting skin cancer [44].In total,10,015 pictures from seven different cancer types make up this dataset such as: VASC (vascular lesion), DF (dermatofibroma), BKL (benign keratosis), AKIEC (actinic keratosis), BCC (basal cell carcinoma), NV (melanocytic nevus), and MEL (melanoma).The convolutional neural network (CNN), which is based on deep learning, more closely approaches the evidence for automatic skin cancer recognition.After the best characteristics are fed into CNN's softmax function, which is employed for classifying different types of skin cancers, the DWT approach is used to extract the key features from the skin cancer  images.The proposed system more properly categorizes the various forms of skin cancer.The HAM 10000 dataset is used to investigate and assess the performance of the suggested model, which results in greater accuracy than the machine learning algorithms that are currently in use.

Preprocessing
Images from the data set are processed into grayscale using a median filter.The algorithm is made simpler and requires less computing when done in grayscale.It is an image processing technology used in digital photography.White is the lightest shade of gray, while black is the deepest, and all traces of color have been eliminated.The brightness of its intermediate shades is typically the same as the brightness of its primary hues (red, blue and green).
A filtering technique for signal and image noise reduction is the median filter.As it moves pixel-by-pixel over the image, the median filter replaces each value with the median of the pixels in its immediate vicinity.An occasionally helpful nonlinear filtering method is median filtering, which keeps the fine details in an image while filtering the noise.

Feature extraction from DWT coefficients
Dermatoscopic screening facilitates the identification of particular forms of skin cancer, and the volatile pixel intensity differences help to more clearly identify lesions.The dataset picture using the random oversampling and under sampling methods, samples are pre-processed.The pre-processed photographs are fed into the cancer detection method as input.The biopsy procedure is used to carry out this identification.The accuracy of identification of the skin cancer is based on the physician's knowledge.Avoiding incorrect predictions may result in poor survival.In order to identify skin cancer, machine learning techniques such as Markov Random Field (MRF), Conditional Random Field (CRF), Particle Swarm Optimization (PSO), K-means, Random Forest (RF), K-Nearest Neighbor (KNN), and Fuzzy-C-Means algorithms are used.

Classification
Artificial Neural Network (ANN)-derived deep learning models have recently been used to solve categorization issues.Numerous deep learning algorithms, including LSTM, RNN, and Gan Encoder, are used to solve this issue.CNN technology is a machine learning methodology that dramatically improves the accuracy of cancer detection.Low-Low (LL), Low-High (LH), High-High (HH), and High-Low (HL) features based on the discrete wavelet transformation (DWT) have been retrieved in this study.The passed input image has been used to extract discrete wavelet transformation (DWT)-based features such as Low-Low (LL), Low-High (LH), High-High (HH), and High-Low (HL).The CNN algorithm is used to efficiently detect the different types of cancer utilizing the LL feature, which in this procedure retains 50% of the relevant pixels from the original image.The primary concept behind discrete wavelet transform (DWT) in image processing is to decompose the image into multiple sub-images characterized by different spatial domains and independent frequencies [45].This suggested approach performs the detection procedure with improved efficiency while requiring less storage and computing time.

Extraction of image using DWT feature
DWT is used to process the pre-processed skin cancer images in order to extract cardinal features using dimensionality reduction.The coefficient of the wavelet has been extracted in this study by localizing frequency information using the Haar-based DWT approach.Each skin cancer image in Haar DWT is rowwise decomposed to produce L (low)-and H (high)frequency subbands, respectively, using low-pass and high-pass filters.Following a column-wise decomposition of these two subbands, four frequency subbands are created: Low-Low (LL), Low-High (LH), High-High (HH) ,and High-Low (HL) as shown in Fig. 2.
Figure 3 shows the images of skin cancer and DWT feature extracted images of seven various types of cancer.The 1st row shows the original images, 2nd row shows gray scale images, and the 3rd row represents the DWT feature extracted LL image with the following specifications: (a) VASC (vascular lesion), (b) DF (dermatofibroma), (c) BKL (benign keratosis), (d) AKIEC (actinic keratosis), (e) BCC (basal cell carcinoma), (f ) NV (melanocytic nevus), and (g) MEL (melanoma).

Implementation details and tools used
After the best characteristics are fed into CNN's softmax function, utilized for the classification of different varieties of skin cancers, the DWT approach is used to extract the key features from the skin cancer images [46].The proposed system more properly categorizes the various forms of skin cancer [47].Utilizing the HAM 10000 dataset, the suggested model is employed to scrutinize and evaluate its performance, yielding a higher accuracy compared to the presently utilized machine learning algorithms [44].

Evaluation metrics employed for assessing the performance
Several evaluation metrics can be employed to assess the performance of the classification model.These metrics help in quantifying the accuracy, recall, precision, and overall effectiveness of the proposed method.
Accuracy measures the proportion of correctly classified skin cancer lesions out of the total number of lesions in the dataset.It provides an overall measure of how well the classification model performs.
Precision measures the proportion of correctly classified malignant skin cancer lesions out of the total number of lesions predicted as malignant.This demonstrates the model's capability to accurately recognize malignant lesions while avoiding the misclassification of benign lesions as malignant.Recall (Sensitivity or True Positive Rate) quantifies the ratio of accurately categorized malignant skin cancer lesions out of the total number of malignant lesions in the dataset.It indicates the ability of the model to correctly identify all malignant lesions, minimizing false negatives.
Specificity (True Negative Rate) measures the proportion of correctly classified benign skin cancer lesions out of the total number of benign lesions in the dataset.This highlights the model's capacity to accurately differentiate benign lesions while avoiding the erroneous categorization of malignant lesions as benign.
The F1 score amalgamates precision and recall, presenting them as a unified metric that strikes a balance between the two.Representing the harmonic mean of precision and recall, it accords equal importance to both measures.
These evaluation metrics help in comprehensively assessing the performance of the skin cancer classification model using DWT.They provide insights into the model's accuracy, ability to distinguish between malignant and benign lesions, and its performance across different aspects of the classification task.

Results
Convolutional neural networks (CNNs) are a distinct type of neural network architecture that has demonstrated exceptional performance in tasks such as image recognition and classification [6].
The architecture of convolutional neural networks (CNNs) used in this manuscript involving the HAM10000 dataset for skin lesion classification tasks comprises several layers designed to extract meaningful features from the images.
1. Input Layer: The input layer receives the image data, usually in the form of pixel values.The size of this layer corresponds to the dimensions of the input images.2. Convolutional Layers: These layers consist of multiple filters or kernels that perform convolution operations to extract features from the images.3. Pooling Layers: The pooling layers, such as Max-Pooling, reduce the spatial dimensions of the feature maps.4. Fully Connected (Dense) Layers: These layers consist of neurons that are fully connected, allowing the network to learn complex patterns in the extracted features.The final dense layers typically perform classification based on learned features.5. Output Layer: The output layer usually has neurons corresponding to the number of classes or categories.For skin lesion classification, it might have neurons representing different types of skin conditions.The activation function used here often depends on the task, here we performed, softmax activation.
CNNs have exhibited superior capabilities in distinguishing faces, objects, and traffic signs, even outperforming human abilities.This prowess has led to their integration into applications like robotics and autonomous vehicles.
CNNs are educated through supervised learning, utilizing labeled data containing pertinent classes.Essentially, CNNs comprise two components: the concealed layers, responsible for feature extraction, and the fully connected layers, engaged in the final classification task once the feature extraction process concludes.CNNs discover the connection between the class labels and the input objects.A CNN's hidden layers adhere to a specific architecture, unlike traditional neural networks.In conventional neural networks, each layer is composed of a set of neurons, and the neurons in each layer are linked to the neurons in the layer before it.The arrangement of concealed layers within a CNN showcases notable dissimilarity.Neurons in a given layer exhibit a somewhat loose connection with certain neurons in the layer above, rather than possessing complete interconnections.The limitation to local connections and extra pooling layers that combine the outputs of individual neurons into a single value results in translation-invariant features.As a result, the model is simplified, and training is made simpler as shown in Fig. 4.
The effectiveness of the suggested approach is evaluated through the utilization of metrics such as Accuracy, Precision, F1-score, Recall (Sensitivity), and Specificity by comparing the detected cancer labels with the original cancer labels from the ISIC 2018 dataset.The various formulations for the performance evaluation metrics are shown as formulas.
The measures of accuracy metrics are calculated by

Recall or Sensitivity metrics is measured by
The metrics for specificity is evaluated by The F1-score is formulated by From formulas (1), ( 2), (3), and (4) the true class of the objects must be known in order to evaluate a classifier.The classifier's assigned class and the actual class are compared to assess the classification quality.This makes it possible to separate the objects into the four groups below:

Discussion
In this method the images from Hamm 10000 dataset are converted and the obtained results are depicted in Fig. 5.The recall, accuracy, F1-Score, and specificity values obtained after training and testing the images are listed.Table 2 shows the results of collected dataset for skin cancer.The values obtained from true positive, true negative and false positive and false negative show the average specificity and sensitivity of the obtained images.The sensitivity and specificity were compared with ANN and multilayer perceptron [48] to represent the performance of automated detection results which is shown in Table 3, and its classification results of accuracy and specificity results of the obtained images are shown in Fig. 6.

Comparison proposed method with existing method
These methods often incorporate DWT as a feature extraction technique and combine it with various classification algorithms [49].Commonly used existing methods are Support Vector Machines (SVM), Random Forest (RF), Artificial Neural Networks (ANN), k-Nearest   Neighbors (k-NN), Naive Bayes, Decision Trees, Ensemble Methods.These existing methods serve as the foundation for skin cancer classification using DWT [50].
To assess the effectiveness of the suggested method in comparison with existing approaches, a thorough comparison was made.The results, as depicted in Table 4, highlight the superiority of our strategy in terms of performance when compared to other networks.Specifically, the utilization of the inception model in the proposed method led to a remarkable overall accuracy of 94%, surpassing the performance of established models.This outcome emphasizes the viability and effectiveness of our method as a promising solution for the task at hand.Table 5 displays the highest achieved accuracy following fine-tuning with various transfer learning models.The ANN method produces 79.80% and multilayer perceptron produces 70.50% of the fine-tuned results of trained and tested images, whereas softmax function produces 94% of accuracy result.
The effectiveness of a proposed discrete wavelet transformation (DWT)-based method for skin cancer classification can be evaluated based on several factors [38].Here are some points to consider when discussing the effectiveness of the proposed DWT-based method: Feature Extraction, Dimensionality Reduction, Classification Accuracy, Robustness, and Generalizability [59].Analysis of the impact of feature selection techniques and classification algorithms is crucial for skin cancer classification using discrete wavelet transformation (DWT) [60].

Conclusion
Cancer is the term for when a cell grows abnormally in the body.If used sooner rather than later, the application that will be used in the future will undoubtedly benefit human existence.In this case, the disease can be diagnosed with 91% specificity early on or in advance in order to ascertain the kind of sickness the patient has and what needs to be done to treat it.The likelihood of survival increases if melanoma is discovered early.The disease can be found with great accuracy of 94%.Given its pivotal role in skin cancer detection, machine learning is poised to offer valuable contributions to the medical field.In the future, this might be expanded to help medical departments automate the diagnosis of skin cancer throughout the eligibility process.The proposed method for skin cancer classification using discrete wavelet transformation (DWT) can have several contributions and implications.In conclusion, skin cancer classification using discrete wavelet transformation is a valuable research area with significant implications for dermatology.Future research directions and potential improvements for skin cancer classification using discrete wavelet transformation (DWT) can focus on addressing existing limitations and exploring new avenues for advancement.
Comparing an approach to the current state-of-theart methods in skin cancer detection involves considering several factors, including accuracy, computational efficiency, robustness, and clinical applicability. Advantages: 1. Feature Fusion: Integration of DWT-extracted features with CNNs allows leveraging both spatial and frequency domain information.

1 .
Resizing and Standardization: Images might be resized to a uniform size to ensure consistency for processing.2. Normalization 3. Data Augmentation 4. Noise Reduction and Filtering: This could involve denoising algorithms or filters to enhance the clarity of lesions. 5. Class Balancing: Ensuring that each class (different types of skin lesions) has a balanced representation within the dataset is crucial.Techniques such as oversampling minority classes or applying class weights during training might be used to address class imbalances.

PH 2 200 Fig. 1
Fig. 1 Overall workflow of CNN with DWT features in deep learning.Combine CNN and DWT features for deep learning with an efficient and powerful image processing workflow

Fig. 2 Fig. 3
Fig. 2 Image extraction using DWT feature.Extract images utilizing the discrete wavelet transform feature for enhanced analysis and processing

1 .
A true positive (TP) occurs when the classifier predicts the positive class in the right way. 2. A true negative (TN) is one in which the classifier predicts the negative class with accuracy.3. False positive (FP): This occurs when the classifier guesses the positive class wrongly.4. False negatives (FN) occur when the classifier guesses the negative class inaccurately.Now, statistical values for the classifier can be computed based on the cardinality of these subsets.

Fig. 4 Fig. 5
Fig. 4 Architecture of convolutional neural network image representing the softmax function.Convolutional neural network architecture visualizing the softmax function for classification tasks in image processing

Fig. 6
Fig. 6 Performance of detection methods.Evaluate the of automated detection methods based on their performance metrics and outcomes

2 .
Interpretability: It allows the clinicians to understand the significance of specific frequency-based features in lesion classification.3. Data Efficiency: Computational resources are limited.

Limitations 1 .
Complexity and Interpretability Trade-off: Increase model complexity, potentially making it harder to interpret the exact features driving classifications.2. Dependence on Transformation Quality: The effectiveness of DWT features depends on the quality and appropriateness of the transformation applied.3. Computational Overhead: Increase computational complexity and training time, potentially making the approach less feasible for real-time applications.

Table 1
Dataset, recent methods used with number of classes and size of the data used to detect skin cancerThe dataset, recent methods employed, along with the number of classes and the dataset size utilized for skin cancer detection

Table 2
Performance measures and values of proposed method

Table 3
Performance of automated detection methods

Table 4
Comparison with various methods

Table 5
Accuracy results of the proposed CNN model with ANN and multilayer perceptron