Feasible Skin Lesion Detection using CNN and RNN

. A prevalent form of cancer that affects millions of individuals globally is skin cancer. The visual examination of skin lesions, however, is a challenging and time-consuming procedure that calls for the knowledge of dermatologists. The proposed effort intends to create an accurate, feasible and effective system for detecting skin lesions that can help dermatologists identify and treat a variety of skin conditions. To extract features from skin lesion photos, the method uses a pre-trained Convolutional Neural Network (CNN). These characteristics are then fed into a Recurrent Neural Network (RNN) for temporal modelling. The early diagnosis of numerous skin illnesses depends greatly on the detection of skin lesions. Deep learning models, particularly CNNs, have demonstrated impressive performance in the computer-aided diagnosis of skin lesions in recent years. This work uses the HAM 10000 dataset to suggest a hybrid CNN and RNN model for skin lesion detection.


Introduction
The increasing incidence of skin lesion cancer due to rising UV radiation and 10% ozone layer depletion is a global health concern.It is essential to protect the skin by wearing protective clothing, applying sunscreen, and avoiding prolonged sun exposure.Maintaining good hygiene, avoiding sharing personal items, and promptly addressing skin diseases or infections are crucial preventive measures [6].Regular skin checks and immediate medical attention for new or changing skin lesions aid in early detection, Skin lesions can also arise from factors like aging, hormonal changes, medications, and underlying medical conditions.Machine Learning algorithms are being utilized to develop a model for feasible detection of skin lesion [7].

Literature survey
Table 1 depicts the significance of few existing skin lesion detection approaches.Authors from [10] focused on early detection and classification of skin cancer types, including melanoma, using machine learning and image processing.It employs pre-processing techniques, color-based clustering, and statistical feature extraction, achieving an accuracy of approximately 96.25% with Multi-class Support Vector Machine (MSVM).Authors from [11] highlighted the significance of ML in prediction, pattern recognition and error reduction across diverse fields, emphasizing the impact of AI in broad domain.Authors from [12] explored the use of anthraquinone-based compounds as potential anticancer agents.Further, discussed regarding development, mechanisms of action, and recent research findings, shedding light on their role in expanding cancer therapeutics.Authors from [13] introduced an efficient method for early-stage disease detection in tomato plants using image processing techniques.Moreover, present work employed clustering, feature extraction, and neural networks, demonstrating superior performance compared to existing methods.[4] The MNIST HAM-10000 dataset, which contains dermoscopic images, is used in the proposal of the system that efficiently identifies and classifies different skin cancers utilizing CNN The lack of contrast with other cutting-edge techniques makes it difficult to assess the approach [5] A deep learning-based, computer-assisted classifier outperforms board-certified dermatologists in the detection of skin tumors using a limited dataset of clinical photos The supervised learning-based classifier demonstrated its promise as an efficient diagnostic tool by reliably detecting skin tumors better than board-certified dermatologists 3 Problem statement and objectives

Problem statement
The objective is to offer a safe, effective method for accurately and more effectively performing skin lesion detection.This seeks to enhance early skin disease detection and diagnosis, supporting dermatologists in early decision-making.The model should be able to use CNNs to examine the spatial characteristics of the skin lesion images and extract pertinent data including texture, shape, and color.Additionally, to detect changes in lesion characteristics over time, it should extract the temporal features from consecutive images using RNNs.As a result, medical practitioners will be able to trust the model and use it successfully in clinical practice.

Objectives
• To offer a quick and accurate technique to find skin lesions that can assist medical practitioners in finding skin lesions early.• To learn the spatial and temporal features of skin lesion images, CNN is integrated with RNN for optimizing the CNNs performance.• To predict multi-skin lesions like melanoma, nevi (moles), dermatofibroma, seborrheic keratosis, basal cell carcinoma, and squamous cell carcinoma

Methodology
This section will demonstrate the conceptual and operational stages of our application.The user logs into the website where the platform is located, registers, and casts their votes securely and openly.The procedure is as follows:

Proposed method
The proposed work aims to create an accurate, feasible and effective system for detecting skin lesions that can help dermatologists identify and treat a variety of skin conditions.To extract features from skin lesion photos, the method uses a pre-trained CNN.These characteristics are then fed into a Recurrent Neural Network (RNN) for temporal modelling.This work uses the HAM 10000 dataset to suggest a hybrid CNN and RNN model for skin lesion detection.The hybrid model combines the advantages of RNNs for temporal dependency detection and CNNs for feature extraction from images.To capture the sequential information, these features are subsequently reshaped and supplied into an RNN layer, specifically an LSTM layer.The model is then added dense layers for categorization.The hybrid model seeks to increase the precision of skin lesion identification by combining CNNs and RNNs.

Architecture of the proposed work
The input image is passed through numerous convolutional layers in the proposed architecture, and then pooling layers are added to decrease the overall dimension of the feature maps [8] and [9].To create a feature vector, the obtained feature maps are flattened and run through a fully linked layer.An RNN-based approach, such as an LSTM network, is then given the feature vector [10].A fully connected layer is then applied to the LSTM network output to get the final prediction.Convolutional and recurrent layers are combined in the suggested architecture for skin lesion identification utilizing CNNs and RNNs, along with additional strategies to enhance performance and avoid overfitting.

Input
The user's image is captured at this point, and the image is then transmitted to the preprocessing stage.The user must enter a legitimate skin picture.

Pre-processing stage
This stage involves taking the user-inserted image and preprocessing it, which entails two processes.
• Resizing images to a uniform size ensures that they have the same dimensions, which can be beneficial for data processing and analysis.By resizing skin lesion images to a consistent size, you eliminate variations in image dimensions.this step the image is resized to the size of 300X300.
• By performing various alterations on the already-existing photos, a technique called data augmentation can be used to unnaturally expand the size of a dataset, such as the 24 interpretation of images of skin lesions.Scaling, cropping, rotation, and other regularly used techniques are only a few.

Feature extraction
The spatial characteristics and temporal characteristics are extracted at this stage.
• For feature extraction in image-related applications, CNNs are frequently used.Multiple convolutional layers, pooling layers, and fully linked layers make up CNNs.The input image is subjected to filters by the convolutional layers, which extract regional patterns and characteristics.The input image is transmitted through the convolutional layers during the feature extraction process using CNNs, which convolve the image using learned filters to detect different characteristics including edges, textures, and forms.• RNNs are frequently employed for the extraction of features.When extracting features from sequential input data using RNNs, each step is processed by a distinct period or sequential component.This hidden state can be used for classification, prediction, or other tasks as well as being processed further by subsequent layers.

Training and evaluation
A hybrid CNN and RNN model learns to extract pertinent features from the provided data and capture temporal connections within these features throughout the training phase.In this procedure, the model's parameters are updated depending on the estimated loss between the anticipated results with the initial reality tags.These steps are frequently taken in the training process.
• Forward Propagation After feeding the model with the input data, the forward propagation procedure starts.The input images are run through the CNN layers, which capture spatial data in a hybrid CNN and RNN model.The RNN layers then 26 use the output of the CNN layers to capture temporal dependencies.• Loss Calculation The output of the RNN layers is compared to the ground truth labels, and the difference between the anticipated output and the real labels is determined using a loss function.Categorical cross-entropy and binary cross-entropy are frequent loss functions used in classification problems.• Performance Metrics Calculation The model's performance is assessed using a variety of performance measures.Accuracy, precision, recall, F1 score, and area under the receiver operating characteristic (ROC) curve are examples of these measurements depending on the particular task.• Once the model is deemed satisfactory based on the validation results, it is tested on an unseen test set to evaluate its generalization and performance on new data.The test set provides an unbiased assessment of the model's efficiency and accuracy in real-world situations.The training and evaluation process requires 27 careful monitoring and analysis to ensure that the model is learning effectively and producing feasible and accurate predictions.

Output Classification
After the training and evaluation of a CNN and RNN model, the final output is obtained through the classification process which is a feasible detection of skin lesion.The output represents the predicted class or label for a given input data point.The model can be used to categorize skin lesions in new images after it has been trained.The model's output in the context of the categorization of pictures is a probability distribution over the various classes or categories.A set of predicted probabilities for each class, showing the chance that the input belongs to each class, makes up the output in most cases.This class is regarded as the most likely or likely candidate label for the specified input data point.A hybrid CNN and RNN model's classification and output can be utilized for a variety of tasks, including speech recognition, object detection, sentiment analysis, image recognition, and natural language processing.The model's ability to accurately classify and assign labels to input data points is fundamental for asking informed decisions and solving complex problems in these domains.

Dataset details
A labelled dataset of skin lesions is necessary for CNN and RNN models.The dataset was created by a team of researchers from the Medical University of Vienna and consists of images obtained from the Department of Dermatology at the Medical University of Graz, Austria.The name "HAM10000" stands for "Human against Machine with 10,000 training images.The dataset was created to address the need for accurate and automated diagnosis of skin cancer, as well as other common skin diseases.HAM10000 contains a total of 10,015 dermoscopic images, captured 7,419 unique patients.These images cover a wide range of skin lesions, including melanoma, nevi (moles), dermatofibroma, seborrheic keratosis, basal cell carcinoma, and squamous cell carcinoma.Each image is accompanied by rich metadata, including clinical information such as age, sex, anatomical location of the lesion, and whether the lesion is benign or malignant.The images in the HAM10000 dataset were captured using a variety of modern dermoscopic, which are specialized devices used for the examination of skin lesions by the dermatologist.

Conclusion and future enhancement
In the discipline of dermatology, the diagnosis of skin lesions using artificial intelligence and neural network approaches has shown considerable potential.These methods are so feasible which have the potential to improve early detection of skin cancers, reduce diagnostic errors, and provide decision support to dermatologists.They also have the advantage of continuous learning and improvement, adapting to evolving trends and variations in skin lesion characteristics.In this study, we created a hybrid model for categorizing photos of skin lesions that employs both CNN and RNN.To increase the precision of lesion categorization, the combination approach tries to combine the geographical data collected by the CNN and the temporal dependencies collected by the RNN.Hybrid CNN-RNN system proved to be effective in classifying skin lesion images, combining the strengths of both CNN and RNN architectures.
Additionally, to the hybrid CNN and RNN model we created for feasible detection of skin lesion, the following improvements should be taken into account to boost the model's performance and accuracy further; (a) Transfer Learning Skin lesion detection can get started with pre-trained models, including those developed using extensive image datasets like ImageNet, (b) Incorporating Clinical Information Clinical data including the history of the patient, demographics, and extra diagnostic procedures can be used to improve skin lesion detection.

Fig. 2 .
Fig. 2. Different types of skin lesions.The images are dermoscopic images, the seven skin lesions are melanoma, melanocytic nevus, basal cell carcinoma, actinic keratosis, benign keratosis, dermatofibroma, and vascular lesion.If any of these skin lesions occur in the human body can cause skin cancer if not recognized early.

Fig. 3 .
Fig. 3. Sample pictures of ham10000 dataset.The following section shows the classification of skin lesion images when the unknown image (testing images) is given as input.

5 . 2
/doi.org/10.1051/e3sconf/20234300105050 430 Results and evaluation Performance Metrics Accuracy, recollection, and the F1 score are some of the performance indicators frequently used to assess the skin lesion detection model.• Confusion Matrix: The efficiency of a classification model can be seen using a confusion matrix.The number of real positives, real adverse effects, false positives, and false negatives are all shown.The matrix sheds light on how well the model can categorize various lesion kinds.The classification accuracy for CNN and RNN are 94% and 97.3%, respectively.• Precision-Recall Curve: Another evaluation metric that illustrates the trade-off between precision and recall at different classification thresholds is the precision-recall curve.

Table 1 .
Summary of approaches.