Early Detection of Monkeypox Skin DiseaseUsing Patch Based DL Model and Transfer Learning Techniques

In the field of medicine, it is very important to prognosticate diseases early to cure them from their initial stages. Monkeypox is a viral zoonosis with symptoms similar to smallpox as it spreads widely with the person who is in close contact with the affected. So, it can be diagnosed using various new age computing techniques such as CNN, RESNET, VGG, EfficientNet. In this work, a prediction model is utilized for better classification of Monkeypox. However, the implementation of machine learning in detecting COVID-19 has encouraged scientists to explore its potential for identifying monkeypox. One challenge in using Deep learning (DL) and machine learning (ML) for this purpose is the lack of sufficient data, including images of monkeypox-infected skin. In response, Monkeypox Skin Image Dataset is collected from Kaggle, the largest of its kind till date which includes images of healthy skin as well as monkeypox and some other infected skin diseases. The dataset undergoes through different data augmentation phases which is fed to different DL and ML algorithms for producing better results. Out of all the approaches, VGG19 and Resnet got the best result with 92% recognition accuracy.


Introduction
The emergence of monkeypox, which was documented by various nations, was brought on by COVID-19, which began in 2020 [1].A member of the Poxviridae family and of the genus Orthopoxviral, the Zoonotic Orthopoxviral is the infectious illness that causes monkeypox [2] and is closely related to both smallpox and cowpox.Although its main carriers are rodents and monkeys, it is also quite common to pass from person to person.In 1958 [3,4], The virus was discovered on a monkey's body at a lab in Copenhagen, Denmark.Diagnosing monkeypox might be difficult for medical experts because the appearance of the lesions and rashes caused by the disease can be similar to other conditions.This problem is compounded by the fact that monkeypox is a rare disease [5], making it difficult for medical experts to have a thorough understanding of it.However, the success of using machine learning to detect COVID-19 has inspired researchers to explore the possibility of using similar techniques to identify monkeypox [6,7].One hurdle in this effort is the lack of data on monkeypox-infected skin, which is necessary to train machine learning algorithms.To address this issue, we provide the Monkeypox Skin Image Dataset 2022, the biggest collection of its kind to date.[8].This dataset was compiled through web scraping and includes images of healthy skin, Skin that has been affected by cowpox, monkeypox, smallpox, smallpox, or measles.This resource, in our opinion, will enable developing machine learning methods for early monkeypox detection in clinical settings easier.In the below Fig 1we can the difference between monkeypox and the normal person's skin.According to the existing research, the majority of them employed the transfer learning approach in conjunction with well-established, pre-trained Deep-Learning algorithms for disease virus detection.Because of the scarcity of literature on the Ahsan et al.'s research on finding the monkey poxvirus.Their idea has worked well in this regard.But there are three big flaws with it.The models only function well for binary classification, to start.Second, they only take into account the VGG-16 DL model for transfer learning rather than identifying the finest pre-trained DL techniques or the most 3 efficient combinations of them to get the greatest results.Third, their theories are not sufficiently explicable.Choosing which medical personnel can be trusted during mass screening may thus be difficult.
First, we enhance the 13 DL models that have been previously trained using the same method in order to overcome the aforementioned limitations.Secondly the accomplishment of each Deep-Learning approach is then evaluated using the aggregated Precision, F1-score, Recall, and Accuracy across five folds.Tertiary, we integrate the best approaches to enhance efficiency all around.The main contributions of the paper are as follows: Compare the suggested method to cutting-edge approaches; conduct ablative research to identify the top-performing deep learning approaches for ensemble-learning; demonstrate the validity of the best-performing Deep learning methods using Grad-CAM [10] and LIME [9]; as well as propose the usage of a single fine-tuned framework with remaining [11,12] pretrained Deep learning methods for Monkey Pox identification and differentiate them.

Proposed Work
The information on the Monkeypox detection process flow is included in the proposed work part.The dataset that is crucial for the detection will come first, generally speaking.Collecting the dataset, making it corrupt-free so that better, more accurate results can be obtained, applying various classification algorithms, analysing each algorithm's performance to see which algorithms are more accurate, and finally performing a comparative analysis of all the algorithms' accuracies are the steps that follow.From these we can finally conclude the results as to whether the patient is having monkeypox or not.Below

4.Overview of Proposed Work
The process we used to gather data, vet experts, and enhance the data is described below.We also demonstrated the database development process.

A. Data gathering
The largest community in the world giving a data platform for machine learners to use, Kaggle, was used to gather 228 images.Each class now includes fewer graphics than before.The total number of unaugmented photos is displayed in Table -I Table I  Transfer learning: Transfer learning refers to the process by which a neural network that has been trained to execute one task may be taught to perform another.These applications are useful for problems with a tiny dataset.
This type of application performs well since the first layer model aims to uncover properties like edges that are shared by both datasets.This is especially valuable in data science since most real-world applications do not require complicated models to be trained on millions of labelled data points [13].
Table II displays data on the number of images utilised before, during, and after arguments.
In this study, we will add some additional layers while freezing the layers from the previously trained model.Old features will also be changed into new dataset predictions (monkeypox dataset) by the addition of additional layers.IMAGENET, a well-known repository of genuine photos, is more potent thanks to its 1000 classes.We'll apply models that have previously been developed with it.We selected seven pre-trained DL models for this investigation.

Model building
Deep learning vs Machine learning Deep learning is a machine learning subfield that is solely based on artificial neural networks, which mimic the human brain in the same manner that neural networks do for deep learning [14,15].We may carry out a variety of tasks using neural networks, including grouping, classification, and regression.We can categorize or classify unlabeled data using neural networks based on the similarities between the samples [16].Or, if the task at hand is classification, we may train the network on a labeled dataset and use the results to divide the samples in that set into several groups.We can see the distinction between machine learning and deep learning in Fig 5 .As the dataset or amount of data grows, deep learning performance increases.Support Vector Machine (SVM).The SVM algorithm is a type of supervised machine learning technique.SVM performs well in comparison to other ML models with a comprehensible margin of class dissociation.It is commonly used to address classification and regression problems.SVM is also commonly used for classification challenges.The basic goal of this approach is to find an optimal decision boundary that can categorize n classes.The optimal decision boundary is often referred to as a hyperplane.
We are all aware that there are two sorts of SVMs: linear and non-linear.Whereas linear SVM is used to solve regression problems, non-linear SVM is used to address classification problems.Non-linear SVM uses kernel methods to separate data using hyperplanes or other mathematical functions, giving it additional flexibility for non-linear data.
We chose non-linear SVM for this project.It takes 224, 244 tensor size inputs with three RGB channels.where the SVM model is trained using the flattened input picture.Finally, the model creates a vector that has the values of other and monkey pox.These probabilities are ensured by adding up to 1 using the softmax method.

VGG
It has a deep, multi-layered Convolutional Neural Network (CNN) architecture.The fundamental components of convolutional neural networks (CNN) form the foundation of VGG-Nets.Three layers make up a convolutional neural network: input, output, and hidden.A very modest number of This network is made up of convolutional filters.ReLU serves as the activation function for all hidden layers.ReLU serves as the activation function for all hidden layers.When employed on a computer, ReLU is more successful since it accelerates learning and reduces the possibility of gradient difficulties disappearing.
The VGG16 AND VGG19 in the study allow input tensor sizes of 224 and 244 with three RGB channels, respectively.When the VGG network gets these input images, it adjusts the weights of the newly added layers.After that, the model generates a vector with the values of other and monkey pox.The softmax approach ensures that these probabilities sum up to 1.

RESNET
ResNets was used to overcome the exploding gradients problem that emerged in VGG-16 and 19.The advent of Residual blocks, which made it significantly easier to train extremely deep networks, enabled the development of the ResNet model.
In this network, we use a technique called skip connections.By skipping a few layers in between, the skip connection connects layer activations to succeeding levels.Regularisation will skip any layer that reduces architectural performance if this sort of skip link is included.As a result, an incredibly deep neural network may be trained without the problems caused by vanishing/exploding gradients.
In the study, RESNET 5O AND RESNET 101 allow input tensor sizes of 224, 244 with three RGB channels.The ResNet network receives these input pictures, adding a new layer and updating its weights as a result.Finally, the model creates a vector that has the values of other and monkey pox.These probabilities are ensured by adding up to 1 using the SoftMax algorithm.

EfficientNet
EfficientNet is a CNN architecture that employs the scaling approach.The scaling approach scales the dimension of the network using a set of coefficients.Using a set of scaling coefficients, the scaling approach will uniformly scale the network's width, depth, and resolution.Using this method, they could determine the proper scaling coefficients for each dimension that needed to be scaled up.The values of the parameters are determined via the compound scaling approach.
According to the study, EfficientNet b0, b1, and b2 accept 224 and 244 input tensor sizes with three RGB channels.When these input images are received, the EfficientNet network changes the weights of the newly added layers.After that, the model generates a vector with the values of other and monkey pox.The SoftMax algorithm ensures that these probabilities sum up to 1.

Performance Evaluation
The overall outcome of the experiment is assessed using popular statistical approaches such as accuracy, precision, recall, and F1-score.The dataset for the study is not very huge.As a result, there is a possibility of misclassification.For example, if true positive (TP) Monkey Pox data points are categorised as others, the patient may not be identified.
To choose the best model from all deployed machine learning and deep learning models, we must carefully study statistical markers.

Accuracy:
The proportion of a model's predictions that are accurate in every situation is shown in equation1.
Precision is measured as the ratio of precisely predicted occurrences to all anticipated favourable outcomes as shown in equation 2.
Recall: The number of relevant results that an algorithm properly recognises out of all potential outcomes is referred to as recall as in equation 3.
F1-score: This statistic is used to assess the model's recall and accuracy skills.The F1 score is widely used in NLP, and it may be changed to promote recall over precision, as illustrated in equation4.
where, the parameters are TP, TN, FP, and FN stand for "true positive," "false positive," "false negative," and respectively.

Results and discussion
In this investigation, both ML and DL models were applied.We utilized SVM for machine learning and vgg16, vgg19, resent50, resnet101, efficientb0, efficientb1, efficientb0 for deep learning.The accuracy values listed below were attained after applying machine learning and deep learning techniques to the dataset of monkeypox disease.VGG19 and RESNET50 have the greatest accuracy of 92% out of all DL approaches.A descriptive examination of each outcome is included below Table III.From Fig. 8 through Fig. 15, a train vs. validation accuracy and loss graph is displayed for each method we utilized.

Table III:
Comparative study of all the results

Conclusion and Future Works
The diagnosis and treatment of monkeypox, a rare skin condition brought on by a virus, according to a recent study, machine learning (ML) and deep learning (DL) may be helpful.In terms of reliably differentiating monkeypox from other skin conditions that are comparable to it and discovering possible therapeutic targets for more effective therapies, ML and DL models have demonstrated encouraging results.The requirement for a significant volume of high-quality data and ethical questions around the use of patient data are still problems, though.Public health and patient outcomes may be significantly improved with further study and development in this field.The model's prediction is a binary prediction.It will indicate whether a person has been infected with the monkey pox.We looked at 7 various pretrained DL models and 1 ML model utilizing transfer learning on the Kaggle dataset, which contains two classes.For determining whether a subject would contract the monkey pox, we found that the VGG19 and RESNET50 algorithm performed the best.When detecting the monkeypox virus, the model performed best (Precision: 96%, Recall: 87%, F1score: 91%, and Accuracy: 92%).

Fig 1 :
Fig 1: Monkeypox vs other images Fig 2 shows the dataset distribution over train and test.

:
The size of the sample Dataset Keras image processing toolkit.A variety of options are available with the ImageDataGenerator function, such as rotating, shrinking, and flipping the image.Fig 3 shows the data distribution over train and test.

Fig 5 :
Fig 5: Deep learning vs Machine learning graph We know that as the size of data increases performance of machine learning algorithms decreases.And in contrast to machine learning, deep learning performance consistently improves as data amount does.The general models employed in this study are shown in Fig 6.

Fig 6 :
Fig 6: Proposed Models Used for Disease Detection 5.1 SVM

Early
Detection of Monkeypox Skin Disease Using Patch Based DL Model and Transfer Learning Techniques EAI Endorsed Transactions on Pervasive Health and Technology 2023 | Volume 9
Increasing the dataset size improves a deep learning model's performance.Therefore, increasing the monkeypox dataset might further improve performance.To improve overall prediction accuracy, an ensemble model can be created by combining the outputs of multiple separate deep learning models.The individual models are typically trained on the same dataset using different topologies, starting weights, or training procedures, which may result in different A. S. Sathwik et al.EAI Endorsed Transactions on Pervasive Health and Technology 2023 | Volume 9

Table II :
The size of the sample augmented for each dataset gathered for this workExpanding the training dataset was achieved using augmentation techniques.In order to zoom in on an image, shift, flip, rotate, and shear the data, the following methods are done accordingly.We first shifted the width by 2.4% and the height by 2.4%.We zoomed the images by 3%, and then flipped them horizontally.Afterward, the images were rotated randomly between 0°-30°.After shearing the dataset according to the 3% range, we ended up with the end result.Below Fig4depicts the overall workflow used for this project.