Segmentation and classification of skin lesions using hybrid deep learning method in the Internet of Medical Things

Abstract Introduction Particularly within the Internet of Medical Things (IoMT) context, skin lesion analysis is critical for precise diagnosis. To improve the accuracy and efficiency of skin lesion analysis, CAD systems play a crucial role. To segment and classify skin lesions from dermoscopy images, this study focuses on using hybrid deep learning techniques. Method This research uses a hybrid deep learning model that combines two cutting‐edge approaches: Mask Region‐based Convolutional Neural Network (MRCNN) for semantic segmentation and ResNet50 for lesion detection. To pinpoint the precise location of a skin lesion, the MRCNN is used for border delineation. We amass a huge, annotated collection of dermoscopy images for thorough model training. The hybrid deep learning model to capture subtle representations of the images is trained from start to finish using this dataset. Results The experimental results using dermoscopy images show that the suggested hybrid method outperforms the current state‐of‐the‐art methods. The model's capacity to segment lesions into distinct groups is demonstrated by a segmentation accuracy measurement of 95.49 percent. In addition, the classification of skin lesions shows great accuracy and dependability, which is a notable advancement over traditional methods. The model is put through its paces on the ISIC 2020 Challenge dataset, scoring a perfect 96.75% accuracy. Compared to current best practices in IoMT, segmentation and classification models perform exceptionally well. Conclusion In conclusion, this paper's hybrid deep learning strategy is highly effective in skin lesion segmentation and classification. The results show that the model has the potential to improve diagnostic accuracy in the setting of IoMT, and it outperforms the current gold standards. The excellent results obtained on the ISIC 2020 Challenge dataset further confirm the viability and superiority of the suggested methodology for skin lesion analysis.


INTRODUCTION
Too much sun exposure increases your risk of developing melanoma, a form of skin cancer affecting individuals of all ages.Although it accounts for only 1% of all cases, it can quickly spread to other body parts if left untreated.The use of solariums and tanning beds has been linked to a 47% increase in the incidence of melanoma during the past decade, according to the statistics. 1 In the United States, 196 060 new cases of melanoma were diagnosed in 2020, resulting in 6850 deaths.
According to the World Health Organization (WHO), 9500 Americans are diagnosed with skin cancer daily. 2 It is common practice for dermatologists and other medical experts to spot skin cancer simply by looking at the affected area.The dermatologist will thoroughly examine any moles, growths, or lesions that may be precursors to skin cancer.To give you the most complete analysis possible, they may employ dermatoscopes and other tools.The dermatologist looks at the skin lesions to determine their symmetry, border smoothness, color uniformity, size range, and pace of change.The letters ABCDE stand for "asymmetry, border irregularity, color variation, diameter, and evolution," which together characterize these characteristics.While these signs can aid in a diagnosis, nothing beats the dermatologist's training and expertise in skin cancer.Chemiluminescence microscopy, or dermoscopy, is another common method. 3nnected medical equipment and software that share data over the Internet are collectively known as the "Internet of Medical Things" (IoMT). 4Wearable fitness trackers, remote patient monitoring systems, smart medical implants, and healthcare-related smartphone apps all fall under this technology category.6][7] This technology is essential in today's healthcare systems because of its ability to expand patient access to care, lower hospitalization rates, and increase the prevalence of preventative medicine through constant monitoring.
With the help of IoMT, medical equipment, wearable sensors, and healthcare networks can all work together to keep tabs on their patients around the clock. 8IoMT sensors and devices can provide real-time information on a wide range of skin characteristics and lesions, making them suitable for early cancer detection.This ongoing flow of information can teach deep learning algorithms to spot even the smallest changes in skin lesions, allowing for more rapid and accurate diagnosis. 9This facilitates earlier detection of skin malignancies and equips individuals to take charge of their health through regular, noninvasive examinations.In addition, IoMT paves the door for telemedicine, which allows patients to consult with dermatologists remotely, increases the number of readily available specialists, and guarantees that patients receive treatment quickly. 10th IoMT and deep learning, skin cancer detection could be greatly enhanced, allowing for earlier diagnosis and treatment for many more people. 11,12 dermoscopy, a tiny region of skin is magnified and illuminated with the help of handheld equipment called a dermatoscopy.This procedure makes better observation and identification of the pigment network, vascular patterns, and other structures associated with skin cancer possible.Reducing the amount of difference between samples is possible through the use of computer-based classification. 13mputer-aided dermatological image categorization methods have been evolving to address data deficiency and imaging complexity.
and other deep learning algorithms [17][18][19][20][21][22] have shown great progress in various skin cancer classifications, with excellent accuracy and robustness.Extraction of discriminative features from photos of skin lesions has been used to obtain outstanding classification results using DenseNet, 23 InceptionNet, 24 and ResNet. 25In addition, ensemble The main contribution of this research is described as follows: • This research introduces an accurate and automated skin lesion segmentation technique that effectively removes unwanted artifacts, including hair, using MRCNN.• The study employs the ResNet model to classify skin lesions, utilizing a transfer learning approach to achieve highly accurate classification results.
• The research provides a comprehensive comparison of the proposed methodology with existing techniques for segmenting and classifying skin lesions, highlighting the advancements and benefits of the novel approach.
Here is the rest of the paper: The literature review can be found in Section 2. The third section explains the materials and procedures used.Experiment details, together with analysis and commentary, can be found in Section 4. Sections 5 and 6 represent the summary and the research needs, respectively.

LITERATURE REVIEW
One form of skin cancer that causes malignant tumors on the skin is melanoma.Photographs taken using a dermatological lens can cause skin cancer.Using machine learning to identify skin cancer with high classification accuracy is based on high-performance images.
Texture analysis with the GLCM (Gray Level Co-occurrence Matrix) was applied by Sheha et al. 13 18 Using images from the ISIC-2017 and PH2 datasets, 32  The segmented lesion was identified with a KELM accuracy rating of 90.67%.
Recent studies significantly focused on classifying skin cancer using various ML and DL techniques.The main problems in recent skin cancer detection are discussed.Images available for analysis are of different sizes due to the different shapes and sizes of lesions, leading to a lack of performance in the detection phase.In this regard, a preprocessing stage is required in the detection phase.Every human has a different skin structure.Some people have hair on their skin, some are without hair.In this sense, the image signal is corrupted.There should be a mechanism to remove hairs and other artifacts from skin images.Low contrast from nearby tissues might occasionally present extra challenges and make it more difficult to diagnose skin cancer correctly.
Color lighting also creates specific challenges with components like color texture, light beams, and reflections.The human body has certain moles that may never turn into cancer cells, making it more challenging to reliably identify skin cancer from malignant photos.Another issue with detecting skin cancer is the current bias, which alters the performance of the algorithms to provide a better result.Table 1 shows the existing studies on skin cancer research.

MATERIAL AND METHODS
In this part, we detail the skin cancer detection algorithms, tools, and technology used in this investigation to identify melanomas.There were three main phases to accurately detect melanoma skin cancer: preprocessing, segmentation, and classification.The Mask R-CNN (MRCNN) 39 and ResNet 40

Proposed method
The proposed method for classifying skin lesions can be broken down into several phases.

Dataset
This study uses dermoscopy skin lesion images from the ISIC Challenge.
Images of skin lesions are included in the ISIC 2020 42

Data splitting
The ISIC Challenge skin lesion images were used for this analysis.This study used skin lesion photographs from the ISIC Challenge.
Processing each image is the initial stage of the operation.The photos used in the segmentation procedure were taken from the dataset of training images.Photos were taken with visible lesions to precisely segment the malignant area.We put 90% of the data through our training and only 10% via our testing procedures.The model was examined via test shots.

Preprocessing
The photographs of skin cancer lesions feature hair, artifacts such as pen lines and rulers, and black frames.Since they can hinder melanoma detection, they should be removed to better ensure accurate skin cancer diagnoses.Several computer vision functions and approaches were employed to filter out the artifacts and hair, making detection easier.
The following are steps for removing distractions from skin pictures.
First, using the Python OpenCV package, 43 the original photos were downscaled to 500 × 500 and turned to grayscale.Black Hat morphological filtering 44 using cv2.MORPH BLACKHAT was used to identify the hair and artifact contours, with a 17 × 17 size kernel and one iteration.In subsequent steps, cv2 was used to do binary thresholding on the images.Use a THRESH BINARY with a value of 10 to emphasize the hair's natural shapes. 45A pixel with a value of 255 would be extremely brilliant, whereas a pixel with a value of 0 would be completely dark.The hair was painted out with a radius of 1 to clean up the original photos, and the finer details were filled in using cv2.INPAINT TELEA used the Fast March Method, which averaged the pixel weights of neighboring marked pixels, to fill in the blanks.As shown in Figure 2, a computer vision-based technique was used to preprocess skin images by removing hairs and other artifacts.

Segmentation
Backgrounds for skin lesions in images might vary widely.This meant that two different groups were affected by the lesion.The lesions were divided into smaller regions using instance segmentation with Mask RCNN (2017), which finds the contours of objects at the pixel level.
The preprocessed pictures were processed in this step to remove the cancerous lesions of interest.

Mask R-CNN
The deep neural network Mask Regional Convolutional Neural Network (MRCNN) 39

VGG IMAGE ANNOTATOR
The VGG Image Annotator 46 generated a dataset using a coco-like style.It is a straightforward method of manually annotating cocoformatted images, videos, and audio files.The coco format dataset with segmentation masks for 80 classes was used to test mask RCNN.The photographs were all scaled down to 500px by 500px.The malignant zone and the noncancerous region were separated into the lesion and backdrop classes, respectively.Polygonal annotations indicating the lesion's presence can be observed in Figure 4.
Original images and JSON files containing polygons of each image will be used as input, and cropped images with lesions will be returned as output.The researchers in this study used the VGG Image Annotator to annotate the coco-format training dataset, resulting in segmentation masks tailored to detect lesions.A thorough dataset description was written for this purpose, including its creation, distribution, and use.

Classification
The segmented lesions were classified as malignant or benign using connections" or "skip connections" allow information to travel from layer to layer and help the network learn the difference between input and output.ResNet's residual block is multilayered, 47 mixing its output with the original input before passing on.In numbers, where X_in It is the input to the residual block.F_in represents the transformation applied to the input by the layers within the block.
X_out the residual block's output is the sum of the transformed input and the original input.By adding the input to the changed output, ResNet efficiently learns the residual mapping, allowing the network to focus on learning the "difficult" parts of the mapping rather than the complete mapping from scratch.This residual learning makes training incredibly deep networks with improved performance significantly easier.Figure 5 below depicts the multitiered architecture of ResNet.
The model was built with the binary cross-entropy loss function in mind, which allows predicting of two classes (benign and malignant).To implement the softmax 44 in the last layer, the vector of integers was converted into a vector of probabilities using the following formula, where the probability for each value was proportional to the various scales of the column.
In this case, the value of the neurons in the output layer is denoted by the letter Z.Each picture is now 224 × 224 pixels in size.The network was built on top of a Resnet50 base with a dropout of 0.5 and batch normalization.We utilized a thick neuronal layer and a SoftMax activation function for binary classification.The Adam optimizer used binary cross entropy as its loss function.The model has been tweaked to run for 100 iterations, 50 steps, 64 batches, a base learning rate of 0.0001, and a minimum learning rate of 1e − 7 that is reduced by a factor of 0.2 if the validation accuracy fails after five iterations.We used Adaptive Moment Estimation (ADAM) 48 with a fixed learning rate to train our segmentation and classification models.It uses the adaptive gradient method as a gradient-based optimization strategy that yields stochastically optimal solutions (AdaGrad).

Experimental setup
TensorFlow and Keras will help Python implement the experiment.

Evaluation policy
A nonlinear classifier called ADAM is employed for classification.Since The positive rate is calculated by counting the number of successfully identified samples.The TPR is the fraction of positive samples (true positives) that were properly recognized by the model relative to the total number of positive samples (true positives + false negatives).
The false positive rate is calculated using the percentage of incorrectly recognized samples.The FPR measures how often a model mistakenly classifies a sample as positive when it is negative.This metric is essential in areas where false positives might have serious effects, like medical diagnostics.
The precision ratio is the proportion of correctly classified samples relative to the total number of accurately predicted elements.Precision can be defined as the fraction of samples containing true positives relative to the total number of samples the model identifies as positive.It is a measurement that determines the accuracy of the model's positive predictions.
The recall is the proportion of adequately categorized samples to all correctly classified instances.The proportion of true positives among all actual positive cases, including those that are missed by the model and are referred to as false negatives, can be calculated using recall.In situations where it is very important to identify as many positive cases as possible, such as in medical diagnostics, it is highly useful.
The terms "T.P.," "T.N.," "F.P.," and "F.N." in these equations, respectively, stand for the number of true positives, true negatives, false positives, and false negatives.These metrics are used extensively in evaluating the performance of classification models.They balance various aspects of a model's effectiveness, depending on the particular context in which the problem is being addressed.

RESULTS AND DISCUSSION
In this section, we will use several metrics to assess how well the suggested method performs and compare that performance to that of established methods.I have broken down the study's findings and commentary into the following sections for your convenience.

Performance analysis of proposed MRCNN
MRCNN formed the basis of the model architecture, with 150 epochs, 100 steps, and 1 batch size as training parameters.The training was extremely efficient, with a momentum value of 0.9 and a base learning rate of 0.001.If there was no improvement in validation accuracy, the learning rate was decreased by 0.0001 to ensure effective learning.
These methods train a model that can accurately segment and detect lesions using an annotated data set and hyperparameters customized specifically for MRCNN.
The training accuracy is low at first (0.4997) but steadily improves as more iterations are performed.This indicates that the model is learning from the data it is fed.The accuracy of validations could be more con-

Comparative analysis of proposed segmentation method with state-of-the-art methods
Table 3 compares the proposed MRCNN skin lesion segmentation approach to numerous state-of-the-art methods across datasets.
The table has rows for methods and columns for citations, method names, datasets, and accuracy.High-resolution CNNs boost accuracy to 93.80% on the ISIC-2017 dataset (first row). 50Additionally, FCN 51 uses fully convolutional networks to achieve 94.5% accuracy on the same ISIC-2017 dataset.The boundary-aware transformer (BAT) method is suggested for skin lesion segmentation. 52This method has 91.20% accuracy on ISIC-2018.The next row describes a CNN-based skin lesion segmentation algorithm using the ISIC-2020 dataset that achieves 94.32% accuracy. 53The new Multi-Scale Residual Encoding and Decoding network (MS-RED) 54 achieves 94.10% accuracy on the ISIC-2017 dataset.In Liu et al., 55  In the final column, MRCNN outperforms all competing approaches on the ISIC-2020 dataset with 95.49% accuracy.Table 3 shows the results of testing multiple skin lesion segmentation methods on different datasets.Compare the proposed MRCNN method to state-of-the-art methods; it more accurately segments skin lesions from dermoscopy images.

Performance analysis of proposed ResNet50
The  The model has a 99% "Benign" class recall, meaning that it correctly identifies most "Benign" samples in the training dataset.This 95% F1 score for "benign" strikes a good mix between accuracy and recall.Precision for the "Malignant" class is 99%, indicating that when the model labels a sample as "Malignant," it is usually correct 99% of the time.
Since the model only has a 90% recall, it risks missing "Malignant" samples.The "malignant" F1 gets 94%.The testing results provide insights into distinguishing "Benign" from "Malignant" samples in the dataset, which provides a well-performing model with excellent accuracy, precision, and recall for both classes.The efficacy of the model and its potential for improvement need to be measured using additional metrics and analysis.Table 4 represents the testing performance of the trained classification model.
The ROC curve was also utilized to evaluate the precision of the model.As shown in Figure 12, the overall performance across all possible classification criteria was 96.1%, represented by the area under the ROC curve.

Comparative analysis of proposed ResNet50 with other state-of-the-art methods
The proposed method for classifying skin lesions is compared to other, more advanced methods in Table 5.A methodology, reference, data collection, and precision are provided in each table entry.MB-CNN, a mutual bootstrapping model for automatic skin lesion segmentation and classification, was proposed in 2020 by Xie et al. 18  complexity and generalization capabilities should be considered for practical skin lesion categorization applications.

CONCLUSION
A new era has begun for CAD systems, particularly in skin lesion analysis, thanks to the IoMT.This study introduces an innovative approach that successfully integrates semantic segmentation with

FUTURE WORK
The accuracy of the classification model can be improved in future studies if additional data are collected on the malignant kind.MRCNN was the foundation employed in the lesion segmentation process.
Using the other pretrained model, omitting the Mask Layer, and relying on the Regional Proposal Network layer to acquire the bounding boxes of the interesting regions allows us to significantly shrink the model.
learning approaches have been used to improve classification performance by combining the strengths of numerous classifiers into a single model.These techniques have already proven their worth in dealing with the complexity and variability of skin lesion images.Accurate skin lesion segmentation and classification approaches to enhance skin cancer diagnosis are the focus of this study.While deep learning has made great strides, it still has a long way to go before it can reliably segment skin lesions and achieve high classification accuracy.Artifacts such as hairs and other undesired features in the photos may cause existing approaches to perform poorly throughout the segmentation process.In addition, the discriminative features included in the segmented regions may need to be utilized more by the classification models, resulting in poorer classification accuracy.Therefore, the purpose of this study is to present a mask-region CNN hybrid approach to accurate skin lesion segmentation, with a special emphasis on the global thresholding technique for getting rid of unwanted hairs and aberrations.In addition, a transfer learning technique involving the Residual Neural Network (ResNet) is employed to guarantee correct classification.The proposed method is superior to previous state-of-the-art methodologies in classifying skin lesions.This research addresses these concerns and contributes to the improvement of skin cancer diagnostic methods.

F I G U R E 1
Proposed hybrid deep learning approach for segmentation and classification.models segment the instances with an MRCNN and learn the features with a ResNet.Accurate segmentation and classification of skin lesions will aid dermatologists and other physicians in diagnosing and treating skin issues Figure 1 demonstrates proposed hybrid deep learning approach for skin lesion segmentation and classification.
challenge dataset for statistical evaluation.This dataset was produced to investigate and improve computer-aided diagnosis systems for diagnosing and classifying skin illnesses, including the deadly melanoma.Dermatologists labeled photos in the dataset.These labels train and test machine learning algorithms to detect skin diseases.Wide range: The diverse ISIC 2020 Challenge dataset includes thousands of pictures from different people, geographic places, and clinical circumstances.Due to its diverse data formats, models trained on this dataset will generalize effectively.CAD for dermatological diagnoses relied on the ISIC 2020 Challenge dataset.It has allowed researchers to develop and test cutting-edge algorithms for early skin condition detection and diagnosis, improving therapy and saving lives.Each picture received processing during the preprocessing phase.
The first step in the procedure involves processing each image.In the segmentation process, the images came from the training images collection.These photos were collected with obvious lesions to accurately segment the malignant zone.Only 10% of the data were used for test-TA B L E 2 Details of dataset.for training.Test photos were used to evaluate the model.

F I G U R E 2
Pictures processed with BLACKHAT morphology are shown in Column 3, pictures processed with binary thresholding in Column 4, and images with unwanted hair eliminated in Column 5.
solves instance segmentation problems in computer vision.Two additional convolutional layers generate a mask in the Faster RCNN variant.The first part analyzes the image and generates possible locations for the object.In the second stage, bounding boxes and masks are created to further classify the suggestions.The ROI alignment is used to digitize the boundaries of the cells and scale the targets to the same dimensions as the input.The values of the feature maps inside the cell are also calculated via interpolation.The architecture of the Mask RCNN is shown in Figure 3. Mask R-CNN introduces ROI Align.Pixel-level segmentation outperforms ROI pooling because ROI aligns less spatial information.Bounding box regression adjusts the region recommendationsʼ bounding boxes until a better match is reached.Mask R-CNN predicts pixelwise segmentation masks for each detected object using bounding F I G U R E 3 MRCNN architecture for skin lesion segmentation.boxes from object detection.The model estimates the box's objectbackground pixel proportion.Mask R-CNN's mask prediction module excels at instance segmentation, object identification, and semantic segmentation.Mask R-CNN combines object identification with pixel-level segmentation to accurately segment and recognize complex objects.It has contributed to computer vision for object detection, autonomous cars, and medical picture analysis.

ResNet50, a F I G U R E 5
CNN pretrained with weights from ImageNet.A 50-layer ImageNet-trained residual pretrained network was used in this study.The layer depth of this residual network is more than that of VGG networks, yet it is still simpler.Like other pretrained models, it was trained on the massive ImageNet dataset and could benefit from the improved depth and simplicity of optimization.A new CNN architecture called ResNet was developed to address the issue of disappearing gradients during very deep network training.Deep networks need help to learn complex mappings because their performance degrades as F I G U R E 4 Annotated samples from the database using VGG Image Annotator.Resnet 50 architecture for skin lesion classification.they become deeper."Residual blocks" are ResNet's solution.ResNet learns residual mapping instead of the underlying mapping."Shortcut these are the most common metrics used in classification challenges, we looked at employing them to make our work competitive with other existing systems: True Positive Rate (TPR), True Negative Rate (TNR), and Area Under the Curve (AUC) (ROC).They are used to evaluate the efficacy of the method.Accuracy is the percentage of correctly identified samples relative to the total number of models.The accuracy metric is a wide-ranging measure of a model's veracity.It considers both positive and negative samples that were appropriately classified as such.The formula takes the sum of all samples and divides it by the sum of all possible outcomes (both positive and negative).ACC = 100 (TP + TN) TP + TN + FN + FP (3)

4. 1 . 4 . 2 .
Performance analysis of proposed MRCNN for segmentation of skin lesion.Comparative analysis of proposed MRCNN with existing segmentation methods.4.3.Performance analysis of proposed ResNet50 for classification of segmented skin lesion.4.4.Comparative analysis of proposed ResNet50 with existing skin lesion classification methods.

F I G U R E 7
sistent at first, but it improves over time.However, in most instances, validation accuracy is lower than training accuracy.Because the model F I G U R E 6 Training and validation accuracy graph of MRCNN.Training and validation loss graph of MRCNN.typically slightly overfits the training data, this occurs frequently.As the training accuracy increases, so does the validation accuracy, providing evidence that the model is improving at generalization to new data.If accuracy improvements decrease to a trickle in later epochs (say, between Epochs 50 and 100), the model's performance may have plateaued.After 100 iterations, the model achieved a training accuracy of almost 97.14% and a validation accuracy of nearly 95.82%, both indicative of a job well done.Figure 6 depicts the training and validation accuracy graph of the segmentation model.It becomes clear that the model improves its fit to the training data as the training loss decreases.Additionally, the validation loss decreases as the model improves, showing that it can successfully generalize to new data.The training loss and the validation loss must be tracked closely when training.A decrease in training loss without a corresponding decrease in validation loss may indicate overfitting, in which the model memorizes the training data rather than learning the underlying patterns.High values for both training and validation losses suggest that the model is underfitting and does not faithfully represent the data.Figure 7 depicts the training and validation loss graph of the segmentation model.The results of the model's segmentation show how well it can find and separate items in photos.With 91.73% precision, the program can find the edges of objects.The model's recall rate of 94.17% shows that it can recognize many of the important things in the pictures.This exact F I G U R E 8 Results of segmentation using testing dataset (A) original images; (B) segmented masks created; (C) cropped images with lesion.segmentation gives an accuracy of 95.49%, which shows that the model is good at classifying pixels.The accuracy of the model's semantic picture segmentation is very good.But the 5.51 loss number may need to be looked at more closely since lower values are better.These results show how useful and effective the model is in semantic segmentation tasks, which can be used in medical imaging, self-driving cars, and other places.Figure 8 depicts the testing results of the segmentation method.Miss segmentation in skin lesion segmentation is caused by several factors, including the wide variety of lesion types, artifacts, the complexity of skin anatomy, uneven lesion borders, a lack of data, and poor algorithmic choices.In this study, skin images contain blurriness and have different types of skin lesions with almost the same color and structure as others, so misclassification occurs while training and testing the segmentation model.

F I G U R E 9 F I G U R E 1 0
results of a deep learning model trained for 50 iterations are displayed in the output.The model is trained on one data set during an epoch, and its accuracy is measured using a different set of data known as validation data.After each epoch, the training and validation accuracy scores are recorded.The blue line depicts the model's success in acquiring knowledge from the training data, which stands for training accuracy.Beginning at about 79.5%, it improves with data-driven model refinement.The training accuracy stabilizes at about 91% after 50 iterations.The red line indicates the validation accuracy, which measures how effectively the model extrapolates to new data.It begins at 93.56% and varies over the epochs.The precision of the validation fluctuates between 92 and 95%. Figure 9 depicts the training and validation accuracy graph of a classification model.The training and validation loss graphs for a deep learning model are shown.The blue line in this graph shows the training loss across 50 iterations, whereas the red line shows the validation loss.Epoch 1 sees a training loss of 53.58% and a validation loss of 19.60% for the model.As measured by a declining training loss, the model improves as it takes in more data.Validation loss decreases, indicating that the model becomes more accurate when applied to new data.Epoch 5 has a higher validation accuracy (val_acc) than Epoch 4, which was 93.56%.This indicates that the model is getting better at applying novel data.Validation accuracy reaches a maximum of 95.01% at Epoch 9, and the model continues to perform admirably through Epoch 13.This indi-Training and validation accuracy graph of ResNet50.Training and validation loss graph of ResNet50.cates the model's success on the validation dataset, where it achieved an accuracy of 95.01%.After Epoch 13, the model's performance on the validation data becomes slightly unstable, although it still has a very high level of accuracy.The training process is fine-tuned by slowing the model's learning rate occasionally to avoid overshooting the optimal weights.It becomes apparent that the model is learning how to classify the skin lesions as the loss decreases and the validation accuracy increases across the training epochs.The model performs quite well, suggesting that it can correctly classify skin lesions without visual signals.Figure 10 depicts the training and validation loss graph of a classification model.The confusion matrix is needed to evaluate classification models on the test set.The report describes the model's predictions.This confusion matrix requires binary classification into "Benign" and "Malignant" classes.Finally, the confusion matrix helps evaluate the binary classification approach.The model's accuracy, precision, recall, and specificity are high.However, several indicators and analyses are needed to assess the model's performance.Figure11shows the confusion matrix of testing results from the trained classification model.

Figure 13 F I G U R E 1 2
Figure 13 demonstrates a few melanoma detection findings.By visually contrasting the model's predictions with the data, the accuracy of a classification model can be demonstrated.Each image in the network represents a unique data instance, and specific pixel positions on the images correlate to the actual and anticipated class labels.By inspecting the graph, we may evaluate the accuracy of the model's predictions.
photographs of skin lesions.The accuracy on the ISIC-2017 dataset was 83.20%.Finally, in 2023, DSNN (deep spiking neural network) was presented by Gilani et al.,42 which is a deep spiking neural network for skin cancer categorization.The accuracy on the ISIC-2019 dataset was 89.57%.Hyperspectral image engineering for skin cancer classification was revolutionized by Huang et al.43 in 2023 with the release of YOLOv5.Unlike previous approaches, this one was validated on a dataset the authors developed, achieving an accuracy of 79.20%.Finally, on the ISIC-2020 dataset, the greatest accuracy of the ResNet50-based method was 96.75%.The ResNet50-based method outperforms state-of-the-art methods in the table, which compares methods used to classify skin lesions.A method's computational lesion classification by employing a hybrid deep learning model.For precise semantic segmentation, the state-of-the-art method employs an MRCNN architecture, whereas lesion categorization is handled by a trained ResNet50.Combining these techniques allows us to locate and map out the exact boundaries of lesions.A large, meticulously annotated set of dermoscopy images is used in the study to set the stage for efficient model training.The segmentation accuracy of the hybrid deep learning model is 95.49%, which is higher than the current state-of-theart approaches.Furthermore, contemporary methods of skin lesion classification represent significant advancements over its antecedents.In the ISIC 2020 Challenge dataset evaluation, the model performed exceptionally well, with an accuracy rate of 96.75%.Collectively, these results place the segmentation and classification models at the forefront of what is considered best practice in IoMT.This research paves the way for more precise skin lesion analysis and highlights IoMT's vast potential for enhancing medical diagnosis and therapy.
State-of-the-art methods for skin image classi-

Table 2
provides details of the dataset used for experiments.
CNN design in the classification pipeline allows accurate skin lesion segmentation.Mask R-CNN's object recognition and instance segmentation capabilities allow us to generate pixel-level masks for each lesion, improving the model's grasp of lesion boundaries.Transfer learning will initialize the ResNet50 spine of the integrated architecture with ImageNet weights.We will use a learning rate scheduler and momentum-optimized SGD to fine-tune the model.We will track accuracy, precision, and recall during training to evaluate the model.
The pretrained ResNet50 model will be fine-tuned with our skin lesion dataset to extract informative features from these photographs.Mask R- NCR-NET (an acronym for "Neighborhood Context Refinement Network") obtains 94.01%accuracy on the ISIC-2017 dataset.MSFNet, a Lightweight Multi-Scale Feature Fusion TA B L E 3 Comparative analysis of proposed segmentation method with state-of-the-art methods.Network, obtains 92.17% accuracy on the ISIC-2018 dataset in the following column. 56Finally, Kaur and Ranade 57 propose a CNN-based skin lesion segmentation method that uses group normalization and a mixed loss function to achieve 91% accuracy on the ISIC-2017 dataset.
Confusion matrix for testing results using trained ResNet50.Testing results of the proposed Resnet50.
The findings show that a classification model can distinguish "Benign" from "Malignant."It is estimated that the model is 96.75% accurate.With 91% precision, the model identifies "Benign" samples.F I G U R E 1 1 TA B L E 4