Image Processing-Based Human Monkeypox Detection using Deep Learning Models

Cihan P

Published on: 2023-11-02


Due to its rapid transmission across numerous nations, monkeypox has emerged as a notable public health issue. Although human monkeypox disease shares symptoms similar to measles and chickenpox, such as rash and fever, there are differences in details such as distinct types of skin lesions. Timely identification and diagnosis of monkeypox play a critical role in ensuring effective treatment and control of the disease. In this study, Convolutional Neural Network (CNN) based deep learning models, including VGG16, ResNet50, EfficientNetB3, Xception, and InceptionResNetV2, were used for the image-based classification of human monkeypox disease. The classification performance of the models was compared using metrics such as accuracy, precision, recall, and F1-score. The results showed that the InceptionResNetV2 model achieved 92% accuracy, demonstrating its success in classifying human monkeypox disease better than other models. This finding indicates the promising potential of the InceptionResNetV2 model in the accurate diagnosis of human monkeypox disease.


Monkeypox; Image-Based classification; Deep learning; CNN; InceptionResNetV2


In June 2022, the World Health Organization (WHO) announced that the monkeypox virus had infected over 3,000 individuals in over 50 countries spanning five regions [1]. The WHO raised concerns regarding this illness and officially classified it as a global health emergency [2].

Monkeypox virus belongs to the Poxviridae family and is a DNA virus related to the smallpox virus [3-7]. The virus is transmitted to humans through close contact with infected animals, infected humans, or contaminated inanimate objects [8,9]. Challenges in the diagnosis of monkeypox include the time-consuming nature of the diagnosis, which can take several days, and the often-vague nature of the symptoms. Furthermore, the limited availability of PCR testing poses a challenge to swiftly diagnosing the disease. This difficulty in rapid diagnosis contributes to the prevention of the disease's spread, despite its relatively low mortality rate of 1-10% [10].

The successful utilization of artificial intelligence methods for different diseases [11-13] or outbreaks [14-21] has prompted researchers to focus on detecting monkeypox disease from skin images. Despite being a relatively new disease with limited studies, successful results have been achieved.

Monkeypox exhibits high similarities with other diseases such as measles, mumps, and smallpox. The similarities between monkeypox and other related diseases make early diagnosis a challenging task. However, it is of utmost importance to identify the disease in its early stages to prevent widespread transmission within the community. Timely identification of the disease holds significant importance in preventing, diagnosing, and efficiently managing the condition. Deep learning methods can come into play in this regard by designing automated systems and providing effective solutions for distinguishing different disease images.

Public databases have been created for the monkeypox virus, including skin lesions and rashes. These databases were constructed by web scraping or manual collection of digital skin lesion images of monkeypox, chickenpox, smallpox, cowpox, and measles diseases. The Monkeypox Skin Images Dataset (MSID) [22], Monkeypox Skin Lesion Dataset (MSLD) [23], and Monkeypox2022 [24] are commonly used datasets in studies. These datasets contain images of monkeypox, chickenpox, measles, and normal skin.

The aim of this study is to determine the best-performing model for detecting monkeypox from skin lesion images using deep learning classification models. Towards this goal, CNN-based deep learning models, including VGG16, ResNet50, EfficientNetB3, Xception, and InceptionResNetV2, were employed for classification. The performance of the methods in disease detection was evaluated using metrics such as accuracy, precision, recall, and F1-score. The article is presented as follows: Section 2 comprehensively reviews relevant studies, Section 3 describes the classification algorithms, Section 4 presents the model comparison metrics and results, and Section 5 concludes the research.

Related Works

Monkeypox disease is often mistaken for other illnesses, leading to misdiagnosis and inappropriate treatment. Early diagnosis and treatment of this contagious disease are of great importance. Detecting monkeypox disease typically requires expert interpretation and clinical examination, which can slow down the treatment process. AI-based detection can assist in the early detection of this disease. There are limited studies in the literature on this topic, which are discussed in detail below.

Sitaula and Shahi [25] evaluated 13 pre-trained deep learning models (including VGG-16, InceptionV3, Xception, MobileNet, Efficient-Net, etc.) for monkeypox detection using the publicly available Monkeypox virus image dataset [24,26]. They trained the models on the ImageNet dataset. The study included 1,754 images, consisting of 329 chickenpox, 286 measles, 587 monkeypox, and 552 normal images. They developed a model using the Keras library in Python. The proposed ensemble learning method outperformed the 13 deep learning methods, achieving an accuracy of 87.13% (precision: 85.44%, recall: 85.47%, F1-score: 85.40%). Xception was the second-best method with an accuracy of 86.51% (precision: 85.01%, recall: 85.14%, F1-score: 85.02%).

Alakus and Baykara [27] classified monkeypox disease and warts based on their DNA sequences. They employed various DNA mapping methods and deep learning. The study used 110 genome sequences, consisting of 55 monkeypox virus and 55 human papillomavirus sequences. To address the data imbalance, they used the zero-padding method. Five DNA mapping techniques achieved an average classification accuracy of 96.08%, with the integer DNA matching method achieving the highest accuracy at 99.5%. This demonstrates the successful detection of monkeypox and warts through DNA mapping and classification.

Ali [23] addressed the challenge of early clinical diagnosis of monkeypox, similar to chickenpox and measles, through computer-aided detection. They created a dataset of skin lesion images from various sources, consisting of 228 images. Three classification methods were used: VGG16, ResNet50, and InceptionV3. ResNet50 achieved the highest accuracy (82.96% ± 4.57), VGG16 performed competitively (81.48% ± 6.87), and InceptionV3 had the lowest accuracy (74.07% ± 3.78). A community model using majority voting outperformed ResNet50 and was integrated into a prototype web application.

Haque [28] aimed to classify human monkeypox disease from images using a pre-trained deep learning model. The study utilized VGG-19, Xception, DenseNet121, MobileNetV2, and EfficientNetB3 deep learning methods for classification. A uniform approach was applied to customize all pre-trained models. To enhance the network's focus on more pertinent feature maps, a convolutional block attention module was incorporated. The initial preparation of the MSLD involved resizing the images to a resolution of 224x224x3 for training purposes. Different hyper parameters were employed to optimize the models' performance in the study. The results revealed that the architecture combining Xception, CBAM, and dense layers outperformed other models in classifying human monkeypox and other diseases, achieving a validation accuracy: 83.89%.

Sahin [29] developed a mobile app using deep learning to detect monkeypox from video footage captured on mobile devices. They used the MSLD dataset and deep transfer learning with Matlab. MobileNetv2 (91.11%) and EfficientNetb0 (91.11%) achieved the best results in 60 epochs. MobileNetv2, with precision (90%), recall (90%), F1-score, and accuracy (91.11%), outperformed other methods and was integrated into an Android mobile app, allowing easy pre-screening for monkeypox.

Akin [30] developed an AI-driven decision support system using CNNs. Their study used a dataset of 572 images (monkeypox and normal). They employed twelve different CNN models for classification, with MobileNetV2 achieving the highest accuracy (98.25%), precision (96.55%), specificity (100%), and F1-score (98.25%). The study also highlighted that MobileNetV2 is suitable for mobile-based monkeypox testing due to its smaller model size.

Ahsan [26] created a dataset of patient images infected with Monkeypox. They aimed to detect monkeypox virus in patients using a modified pretrained VGG16 model. The study collected a total of 1915 images, including monkeypox, chickenpox, measles, and normal images, as well as augmented versions. Two separate studies were conducted, one with a small dataset and the other with a medium-sized dataset. In the first study, using a small dataset, the VGG16 model achieved training and testing accuracy rates of 97% and 83%, respectively. In the second study, with a medium-sized dataset, the model achieved accuracy rates of 88% in training and 78% in testing. The proposed model's predictions were validated through cross-validation by medical professionals. The study suggests that this model could be used to develop a mobile-based diagnostic tool.

Irmak [31] used the MSID dataset and three pretrained CNN models for classification: MobileNetV2 (91.37% accuracy), VGG16 (83.62% accuracy), and VGG19 (77.58% accuracy). MobileNetV2 also excelled in precision (90.50%), recall (86.75%), and F1-score (88.25%). VGG16 followed with precision (79.75%), recall (74.50%), and F1-score (76.50%), while VGG19 performed the least favourably. For individual classes, precision, recall, and F1-scores were reported. The study outperformed two other studies in the same field (82.96% to 83% test accuracy).

Yang [32] introduced an AI-based monkeypox detection device called AICOM-MP, addressing dataset shortcomings. They created the AICOM-MP dataset with unique monkeypox images, enriching and balancing it. This dataset, built upon the MSLD, included 132 monkeypox images and 180 images of other diseases. The AICOM-MP model trained on this dataset achieved outstanding results with weighted precision: 0.9650, weighted recall: 0.9634, and weighted F1-score: 0.9635.

Kumar [33], a variety of deep CNN models and machine learning classifiers were investigated for the purpose of diagnosing monkeypox through the analysis of skin images. For this purpose, bottleneck features of the GoogleNet, AlexNet, and VGG16Net models were combined with SVM, Naive Bayes, Random Forest, KNN, and decision tree classifiers. MSLD was used in the study. All experiments were conducted using Google Colab and PyTorch. As a result, the highest accuracy: 91.11% was achieved using VGG16Net features with the Naive Bayes classifier.

Ahsan [34] used VGG16, InceptionResNetV2, ResNet50, ResNet101, MobileNetV2, and VGG19 to detect monkeypox disease. The study had two parts: one with 76 images (43 monkeypox, 33 non-monkeypox) and another with 818 images (587 monkeypox, 231 non-monkeypox). Data augmentation techniques were applied. The InceptionResNetV2 and MobileNetV2 models showed the highest performance, achieving accuracy levels between 93% and 99%.

Hussain [35] employed AI to detect monkeypox using digital skin images. They collected images from various sources, including monkeypox, chickenpox, smallpox, cowpox, and measles cases, as well as healthy skin images. The study utilized 804 original images and 39,396 augmented images. For classification, they compared ResNet50, DenseNet121, ShuffleNet-V2, MnasNet-A1, Inception-V3, MobileNet-V2, and SqueezeNet. ShuffleNet-V2 achieved the highest accuracy (79%), followed by DenseNet121 (78%), with SqueezeNet performing the least effectively (65%).

Gulmez [36] proposed a new deep CNN model called Monkeypox Hybrid Net for monkeypox detection. Monkeypox Hybrid Net consists of three different deep CNN models: ResNet50, VGG19, and InceptionV3. The dataset used in the article was obtained from Ahsan et al. [34]. Monkeypox Hybrid Net yielded the best results in each category with 84.2% accuracy, 86.2% precision, and 84.2% F1-score. InceptionV3 performed as the second-best model with 80.5% accuracy, 82.7% precision, and 79.1% F1-score. ResNet50 provided the lowest results with 59.5% accuracy, 55.3% precision, and 51% F1-score.

Khafaga [37] introduced BERSFS-CNN, a novel framework for monkeypox detection using deep CNNs. They used the MSID dataset, pre-processing images into four categories. BERSFS-CNN outperformed SVM-Linear, CNN, KNN, and decision trees, achieving an accuracy of 98.83%. The CNN model had the second-highest accuracy at 93.37%.

Deep Learning Classification Algorithms

In this study, CNN based deep learning models, namely VGG16, ResNet50, EfficientNetB3, Xception, and InceptionResNetV2, were used to perform image-based classification of monkeypox disease. Brief descriptions of these models are provided below:

VGG16 is a deep learning model developed at the University of Oxford. VGG stands for Visual Geometry Group, and 16 refers to the number of layers in the model [38]. VGG16 is a CNN model commonly used for image classification tasks. The model consists of convolutional layers, fully connected layers, and pooling layers. The pooling layers reduce the size of the data and emphasize important features [39]. VGG16 is a large model with a high number of learnable parameters due to its depth. It is often preferred for large datasets and more complex image classification problems. VGG16 gained popularity, particularly for achieving high performance on the ImageNet dataset. It is recognized for its emphasis on the basic structure of convolutional networks and the depth of its layers, which has influenced the foundation of similar models with depth and weighted convolutional layers.

ResNet50 is a widely used Convolutional Neural Network (CNN) model in the field of deep learning. ResNet (Residual Network) is a model introduced by Microsoft Research in 2015, specifically designed to address the problems associated with depth in deep networks. ResNet50 is a deep network with 50 layers and incorporates a special structure called a residual block. These blocks aim to alleviate the problem of gradient vanishing that occurs in deeper networks by introducing skip connections in the network's transitions. The residual blocks enable a smoother and faster flow of information through the network compared to previous layers [39]. ResNet50 includes fundamental CNN components such as convolutional layers, activation functions, and pooling layers. It also features a global average pooling layer in the middle of the network, which summarizes information using smaller-sized feature maps.

InceptionResNet is a variation that combines the Inception architecture with the ResNet architecture [40]. The Inception architecture consists of convolutional layers with filters of different sizes, while the ResNet architecture uses residual connections to address gradient vanishing in deep networks. InceptionResNet aims to combine these two architectures to facilitate the training of deeper and more complex networks. The Inception blocks bring together convolutional layers with filters of different sizes to capture a wide range of features, while the ResNet blocks ensure the flow of information by utilizing connections to alleviate gradient vanishing.

Xception is a deep learning model that stands for Extreme Inception, which is an abbreviation of the concept [41]. It is based on the CNN architecture, specifically a variation of the Inception model. The main goal of Xception is to enhance the computational efficiency of the Inception network. To achieve this, it optimizes the convolution operations in the Inception blocks, diverging from the traditional CNN approach. This optimization is achieved through a technique called depth wise separable convolution. Depth wise separable convolution performs convolution operations in two stages. The first stage involves a point wise convolution layer, which adjusts the dimension of the input data and captures dependencies between different channels. The second stage is a depth wise convolution layer, which processes each channel of the input data separately, thereby enhancing computational efficiency.

EfficientNetB3, a CNN model used in the field of deep learning [42]. It is a member of the EfficientNet family, and EfficientNetB3 is a scalable and efficient model. EfficientNet utilizes an approach called Compound Scaling, which automatically scales deep learning models to various sizes. EfficientNetB3 is designed to be used in larger and more complex datasets. The model combines scalability and depth features to achieve better performance on smaller-sized datasets. EfficientNetB3 includes various convolutional layers, activation functions, and pooling layers to process input images.

Results and Discussion

In this study, the Monkeypox Skin Lesion Dataset (MLSD) [23] was utilized. This dataset was obtained from the Kaggle website [43]. The dataset consists of binary classification data, including Monkeypox cases and others (chickenpox and measles skin lesion images). The acquired skin lesion images underwent pre-processing to retain only high-quality unique images. In the final stage, the images were cropped and resized to 224x224 pixels. MSLD contains a total of 228 images, with 102 belonging to the Monkeypox class and 126 belonging to the other class (chickenpox and measles). Sample images from the Monkeypox and other classes in the MSLD dataset are provided in Figure 1.

Figure 1: Sample images from the MSLD [23].

In order to evaluate the classification performance of the models, accuracy, precision, recall, and F-score metrics [13] were used. The classification performance of five models is presented in Table 1. When analyzing the classification performance presented in Table 1, it can be observed that the VGG16 model achieved an accuracy of 0.79, precision of 0.71, recall of 0.75, and an F1-score of 0.73 for monkeypox detection. The VGG16 model demonstrates commendable accuracy and F1-score values. On the other hand, the ResNet50 model achieved an accuracy of 0.72, precision of 0.61, recall of 0.69, and an F1-score of 0.65 for monkeypox detection, indicating slightly lower performance compared to the other models. In contrast, the EfficientNetB3 model displayed impressive performance with an accuracy of 0.86, precision of 0.79, recall of 0.95, and an F1-score of 0.86 for monkeypox detection, showcasing high accuracy and F1-score values. Similarly, the Xception model achieved an accuracy of 0.83, precision of 0.77, recall of 0.85, and an F1-score of 0.81 for monkeypox detection, demonstrating good performance. Finally, the InceptionResNetV2 model exhibited the highest performance, boasting an accuracy of 0.92, precision of 0.80, recall of 1.00, and an F1-score of 0.89 for monkeypox detection. It showcases outstanding performance with high accuracy and recall values.

Table 1: Classification Performance Results of the Models.































In Figure 2, the confusion matrix for the VGG16, ResNet50, EfficientNetB3, Xception, and InceptionResNetV2 models used in the study is presented. The confusion matrix depicts the count of images that are categorized as belonging to specific classes (actual) but are classified into different classes (predicted) by the model.

Figure 2: Confusion Matrix for used Models.

It can be observed that the InceptionResNetV2 model shows the highest performance for monkeypox detection. The EfficientNetB3 and VGG16 models also exhibit good performance. On the other hand, the ResNet50 model appears to have lower performance compared to the other models. Considering the success metrics of each model, it is important to select the most suitable model for monkeypox detection.


This study evaluated the performance of different deep learning models based on CNN for image-based classification of human monkeypox disease. The InceptionResNetV2 model exhibited the highest accuracy and recall values compared to the other models, demonstrating the best performance. The EfficientNetB3 and VGG16 models also yielded good results. However, the performance of the ResNet50 model was found to be relatively lower than the other models. Considering the success metrics of each model, it is important to select the most suitable model for monkeypox detection. The validation accuracy reaching 92% for the InceptionResNetV2 model can be considered a promising result for accurate diagnosis of human monkeypox disease. In this study, data augmentation techniques were applied to diversify the images by rotating, horizontally and vertically flipping, zooming, and randomly shifting them. Additionally, different hyper parameter values such as learning rate, batch size, number of epochs, and optimizer were experimented with to find an optimal combination for achieving the best results. In conclusion, the findings from this study indicate that deep learning models can be an effective tool for the detection of human monkeypox disease.

Author Contributions

PC: Conceptualization, methodology, software, validation, visualization, writing – original draft and editing.

Conflict of Interest        

The authors declared that there is no conflict of interest.


  1. Thornhill JP. Monkeypox Virus Infection in Humans Across 16 Countries-April-June 2022. N Engl J Med. 2022; 387: 679-691.
  2. Mpox (monkeypox). 2023.
  3. Di Giulio DB, Eckburg PB. Human Monkeypox: An Emerging Zoonosis. Lancet Infect Dis. 2004; 4: 15-25.
  4. Peter OJ, et al. Transmission Dynamics of Monkeypox Virus: A Mathematical Modelling Approach. Model Earth Syst Environ. 2022; 8: 1-12.
  5. León-Figueroa DA, et al. The Never-Ending Global Emergence of Viral Zoonoses after COVID-19? The Rising Concern of Monkeypox in Europe, North America and Beyond. Travel Med Infect Dis. 2022; 49.
  6. Mileto D, et al. New Challenges in Human Monkeypox Outside Africa: A Review and Case Report from Italy. Travel Med Infect Dis. 2022; 49.
  7. Alakunle E, et al. Monkeypox Virus in Nigeria: Infection Biology, Epidemiology, and Evolution. Viruses. 2020; 12.
  8. Get Both Doses of the Mpox Vaccine. 2023.
  9. Mpox (monkeypox) outbreak 2022. 2022.
  10. Gong Q, et al, Monkeypox Virus: A Re-Emergent Threat to Humans. Virol Sin. 2022; 37: 477-482.
  11. C?han P, Co?kun H. Performance Comparison of Machine Learning Models for Diabetes Prediction. in 2021 29th Signal Processing and Communications Applications Conference (SIU). 2021.
  12. Cihan P, et al. Prediction of Immunoglobulin G in Lambs with Artificial Intelligence Methods. 2021; 27.
  13. Cihan P, Kalipsiz O, Gökçe E. Yenido?an kuzularda bilgisayar destekli tan?. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi. 2020; 26: 385-391.
  14. Cihan P. Forecasting Fully Vaccinated People Against COVID-19 and Examining Future Vaccination Rate for Herd Immunity in the US, Asia, Europe, Africa, South America, And The World. Appl Soft Comput. 2021: 111.
  15. Cihan P. Fuzzy Rule-Based System for Predicting Daily Case in Covid-19 Outbreak. in 2020 4th International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT). IEEE. 2020.
  16. Cihan P. Impact of the COVID-19 lockdowns on electricity and natural gas consumption in the different industrial zones and forecasting consumption amounts: Turkey case study. Int J Electric Power Energy Syst, 2022; 134.
  17. Cihan P. Time-series Forecasting of Energy Demand in Electric Vehicles and Impact of the COVID-19 Pandemic on Energy Demand. Sakarya Univ J Comput Inf Sci. 2023. 6(1): p. 10-21.
  18. Cihan P. ARIMA-based forecasting of total COVID-19 cases in the USA and India. in 2021 29th Signal Processing and Communications Applications Conference (SIU). 2021. IEEE.
  19. Cihan P, Ozger ZB. A new approach for determining SARS-CoV-2 epitopes using machine learning-based in silico methods. Comput Biol Chem. 2022; 98.
  20. Cihan P. The machine learning approach for predicting the number of intensive care, intubated patients and death: The COVID-19 pandemic in Turkey. Sigma J Eng Nat Sci. 2022; 40: 85-94.
  21. Ozger ZB, Cihan P. A novel ensemble fuzzy classification model in SARS-CoV-2 B-cell epitope identification for development of protein-based vaccine. Appl Soft Comput. 2022; 116.
  22. A New Multiclass Skin-based Image Datatset for Monkeypox Disease Detection. 2022.
  23. Ali SN, et al. Monkeypox skin lesion detection using deep learning models: A feasibility study. arXiv. 2022.
  24. Ahsan M, et al. Deep transfer learning approaches for Monkeypox disease diagnosis. Expert Syst Appl. 2023; 216.
  25. Sitaula C, Shahi TB. Monkeypox virus detection using pre-trained deep learning-based approaches. J Med Syst. 2022; 46.
  26. Ahsan MM, Uddin MR, Luna SA. Monkeypox image data collection. arXiv. 2022.
  27. Alakus TB, Baykara M. Comparison of Monkeypox and wart DNA sequences with deep learning model. Appl Sci. 2022; 12.
  28. Haque E, et al. Classification of human monkeypox disease using deep learning models and attention mechanisms. arXiv. 2022.
  29. Sahin VH, Oztel I, Oztel GY. Human monkeypox classification from skin lesion images with deep pre-trained network using mobile application. J Med Syst. 2022. 46.
  30. Akin KD, et al. Classification of monkeypox skin lesion using the explainable artificial intelligence assisted convolutional neural networks. Avrupa Bilim ve Teknoloji Dergisi. 2022; 40: 106-110.
  31. Irmak MC, Aydin T, Ya?ano?lu M. Monkeypox skin lesion detection with MobileNetV2 and VGGNet models. in 2022 medical technologies congress (TIPTEKNO). 2022. IEEE.
  32. Yang TT, et al. AICOM-MP: an AI-based Monkeypox Detector for Resource-Constrained Environments. arXiv. 2022.
  33. Kumar V. Analysis of CNN features with multiple machine learning classifiers in diagnosis of monkeypox from digital skin images. medRxiv. 2022.
  34. Ahsan MM, et al. Transfer learning and Local interpretable model agnostic based visual approach in Monkeypox Disease Detection and Classification: A Deep Learning insights. arXiv. 2022.
  35. Hussain MA, et al. Can artificial intelligence detect Monkeypox from digital skin images? BioRxiv. 2022.
  36. Gülmez B. MonkeypoxHybridNet: A hybrid deep convolutional neural network model for monkeypox disease detection. Int Res Eng Sci. 2022; 3: 49-64.
  37. Khafaga DS, et al. An Al-Biruni earth radius optimization-based deep convolutional neural network for classifying monkeypox disease. Diagnostics. 2022; 12.
  38. Deng J, et al. Imagenet: A large-scale hierarchical image database. in 2009 IEEE conference on computer vision and pattern recognition. 2009..
  39. He K, et al. Deep residual learning for image recognition. in Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.
  40. Szegedy C, et al. Inception-v4, inception-resnet and the impact of residual connections on learning. in Proceedings of the AAAI conference on artificial intelligence. 2017; 31.
  41. Chollet F. Xception: Deep learning with depthwise separable convolutions. in Proceedings of the IEEE conference on computer vision and pattern recognition. 2017; 1251-1258.
  42. Tan M, Le Q. Efficientnet: Rethinking model scaling for convolutional neural networks. in International conference on machine learning. 2019. PMLR.
  43. Kaggle. Monkeypox Skin Lesion Dataset. 2022.