Classification of Human Monkeypox Disease Using Deep Learning Models and Attention Mechanisms
Classification of Human Monkeypox Disease Using Deep Learning Models and Attention Mechanisms
Abstract—As the world is still trying to rebuild from the calls for keeping isolation and a distance from other people,
destruction caused by the widespread reach of the COVID-19 and so on.
virus, and the recent alarming surge of human monkeypox
outbreaks in numerous countries threatens to become a In recent research, it is clear that deep learning is far more
new global pandemic too. Human monkeypox disease symptoms sophisticated than classical machine learning models[3] like
are quite similar to chickenpox, and measles classic symptoms, KNN, Random Forest classifier, and so on. However, they
with very intricate differences such as skin blisters, which come remain machines that solve the categorization problem by
in diverse forms. Various deep-learning methods have shown requiring additional domain knowledge and human
promising performance in the image-based diagnosis of Covid- involvement. Additionally, traditional machine learning
19, tumor cell, and skin disease classification tasks. In this models are typically only effective for the tasks for which they
paper, we try to integrate deep transfer learning-based methods, were created. Therefore, the traditional machine learning
along with a convolutional block attention module (CBAM) to approach may not be as effective in this subject.
focus on the relevant portion of feature maps to conduct an
image-based classification of human monkeypox disease. We Due to the superior learning capabilities of deep learning
implement five deep learning models—VGG19, Xception, models notably the variants of convolutional neural networks
DenseNet121, EfficientNetB3, and MobileNetV2 along with (CNNs), have recently transformed various fields of medical
integrated channel and spatial attention mechanisms and science [4][5]. These deep networks can analyze images in
perform a comparative analysis among them. An architecture several layers, automatically identify significant features, and
consisting of Xception-CBAM-Dense layers performed better learn to discover the best representations for particular tasks
than the other models at classifying monkeypox and other when trained with a huge amount of data. Also transferring
diseases with a validation accuracy of 83.89%. learning models helps to tackle the problem of the enormous
dataset demand.
Keywords—Monkeypox, Classification, Image-based
diagnosis, Deep Learning, Channel attention, Spatial Attention. Transfer learning is another method that is frequently
employed when there is a lack of data. With this technique, a
I. INTRODUCTION CNN model that has already been trained on a big dataset
According to World Health Organization (WHO) [1], (such as ImageNet) is used to transfer its knowledge to a
Monkeypox is a rare disease caused by the monkeypox virus. separate, much smaller dataset for context-specific learning.
It can spread from animals to people and is transferable As a result, employing the transfer learning method will speed
between people and the environment since it is a viral zoonotic up, simplify, and improve our performance compared to other
infection. The monkeypox outbreak became the most talked- traditional ways.
about topic in the world after the COVID-19 pandemic was In this study, we used the Monkeypox Skin Lesion Dataset
over. Up to this point, a total of 72,874 confirmed cases have (MSLD) [6] and a few transfer-learning-based models with
been discovered, including 28 deaths across 12 locations[2]. the CBAM attention mechanism. Used transfer learning
Fever, headache, muscle aches, back discomfort, low energy, model for comparing is - VGG19 [7], DenseNet121[8],
and swollen lymph nodes are the most typical signs of Xception [9], EfficientNetB3 [10] and MobileNetV2 [11] and
monkeypox, which can also be followed by the appearance of we were able to predict the enhanced train data with an
a rash[1]. The face, palms of the hands, soles of the feet, groin, accuracy of 69.86% for VGG19 and 78.27% for
genital, and/or anal regions might all be affected by the DenseNet121, 54.21% for EfficientNetB3 model, 74.07% for
rash[1]. The slight distinction between monkeypox and Others MobileNetV2 model and 79.90% for proposed Xception
(measles, chickenpox) is inflammation and rash on the body, model.
which is difficult to detect by human eyes except by the
Polymerase Chain Reaction (PCR) Test. The remaining papers are divided into the following
sections, with section II covering the specifics of the related
It is exceedingly difficult for medical professionals to make work with our paper, section III states the methodology and
an accurate diagnosis of this disease quickly. Additionally, it related materials that are required for the study, section IV
is difficult to find the PCR test used to detect the monkeypox states experimental details like dataset description,
virus. However, prompt diagnosis of this illness is necessary hyperparameter tuning information and evaluation metrics
to stop the spread by adhering to other WHO-provided details and with result analysis.
guidelines and the first step of preventing monkeypox, which
II. RELATED WORK feature maps with we incorporate the convolutional block
Recently many researchers have explored diverse deep attention module.
learning algorithms for the detection of human monkeypox
disease. Ali et al. [6] Incorporated VGG-16, ResNet50, and
InceptionV3 pre-trained models for the classification of
monkeypox and other diseases (chickenpox, measles) on the
Monkeypox Skin Lesion Dataset (MSLD) which was
developed by the authors. The dataset contains images of skin
lesions in two categories. One is Monkeypox and Others
(Chickenpox, Measles). The overall accuracy ResNet50
achieved is 82.96(±4.57%), and VGG-16 achieved
81.48(±6.87%). The author ensembled these three models
and resulting in an accuracy of 79.26 (±1.05%).
A) Dataset
To classify Monkeypox among chickenpox, measles, and
monkeypox we used Monkeypox Skin Lesion Dataset
(MSLD) [6]. This image dataset includes a total of 228
original images of measles and chickenpox. Some of the
Figure 2. Design of the Channel attention module [16].
images are demonstrated in fig. 3 and fig. 4. The dataset
includes both original images and augmented folded images
Channel attention [16] as illustrated in Figure 2. focuses (Train, Test, Validation) with a proportion of 70:10:20. We
on the inter-channel relationship of features and the reduction used the data from the augmented Train folder for training,
of channel redundancy. The features of average-pooling and which contains 2142 images in 2 classes (Monkeypox,
max-pooling were combined to aggregate the two separate Others). Here, the training and validation images from the
spatial descriptors Fcavg and Fcmax. dataset were augmented while the test set contained only the
original images.
The channel attention map Mc ∈ RCx1x1 is obtained by feeding
these descriptors into a shared network made up of a multi-
layer perceptron (MLP) with a single hidden layer, after
which the output feature vectors are subjected to a merging
process. Overall, the calculation is:
= σ (W1(W0(Fcavg)) + W1(W0(Fcmax))) ……….…… (3) Figure 4. Monkeypox skin lesion sample images.
Figure 6. Generated confusion matrix from the 4-fold cross [1] “Monkeypox: Questions and Answers,”
validation. https://www.who.int/news-room/questions-and-
answers/item/monkeypox?gclid=CjwKCAjwg5uZBhATEiwAh
hRLHkkxZ8te7FJSn9IVwo_uWb3bua5tjv0gtxwibxbZqzwJ2xo
mhOWJbxoCg48QAvD_BwE, Aug. 31, 2022.
[2] “2022 Monkeypox Outbreak Global Map | Monkeypox |
Poxvirus CDC.”
https://www.cdc.gov/poxvirus/monkeypox/response/2022/worl
d-map.html (accessed Oct. 14, 2022).
[3] I.H. Sarker, “Deep Learning: A Comprehensive Overview on
Techniques, Taxonomy, Applications and Research Directions,”
SN Comput Sci, vol. 2, no. 6, pp. 1–20, Nov. 2021, doi:
10.1007/S42979-021-00815-1/FIGURES/13.
[4] D. Ravi et al., “Deep Learning for Health Informatics,” IEEE J
Biomed Health Inform, vol. 21, no. 1, pp. 4–21, Jan. 2017, doi:
10.1109/JBHI.2016.2636665.
[5] F. Wang, L. P. Casalino, and D. Khullar, “Deep Learning in
Medicine-Promise, Progress, and Challenges,” JAMA Intern
Med, vol. 179, no. 3, pp. 293–294, Mar. 2019, doi:
10.1001/JAMAINTERNMED.2018.7117
[6] S. N. Ali et al., “Monkeypox Skin Lesion Detection Using Deep
Learning Models: A Feasibility Study,” Jul. 2022, [Online].
Available: http://arxiv.org/abs/2207.03342
[7] K. Simonyan and A. Zisserman, “Very Deep Convolutional
Networks for Large-Scale Image Recognition,” 3rd International
Conference on Learning Representations, ICLR 2015 -
Conference Track Proceedings, Sep. 2014, doi:
10.48550/arxiv.1409.1556.
[8] G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger,
“Densely Connected Convolutional Networks,” Proceedings -
30th IEEE Conference on Computer Vision and Pattern
Recognition, CVPR 2017, vol. 2017-January, pp. 2261–2269,
Aug. 2016, doi: 10.48550/arxiv.1608.06993.
[9] F. Chollet, “Xception: Deep Learning with Depthwise Separable
Convolutions,” Proceedings - 30th IEEE Conference on
Computer Vision and Pattern Recognition, CVPR 2017, vol.
2017-January, pp. 1800–1807, Oct. 2016, doi:
10.48550/arxiv.1610.02357.
[10] M. Tan and Q. v. Le, “EfficientNet: Rethinking Model Scaling
for Convolutional Neural Networks,” 36th International
Conference on Machine Learning, ICML 2019, vol. 2019-June,
pp. 10691–10700, May 2019, doi: 10.48550/arxiv.1905.11946.
[11] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen,
“MobileNetV2: Inverted Residuals and Linear Bottlenecks,”
Proceedings of the IEEE Computer Society Conference on
Computer Vision and Pattern Recognition, pp. 4510–4520, Jan.
2018, doi: 10.48550/arxiv.1801.04381
[12] T. Islam, M. A. Hussain, F. Uddin, H. Chowdhury, and B. M. R.
Islam, “Can Artificial Intelligence Detect Monkeypox from
Digital Skin Images?”, doi: 10.1101/2022.08.08.503193.
[13] M. M. Ahsan, M. R. Uddin, M. Farjana, A. N. Sakib, K. al
Momin, and S. A. Luna, “Image Data collection and
implementation of deep learning-based model in detecting
Monkeypox disease using modified VGG16,” Jun. 2022,
[Online]. Available: http://arxiv.org/abs/2206.01862
[14] C. Sitaula and T. B. Shahi, “Monkeypox virus detection using
pre-trained deep learning-based approaches,” Sep. 2022,
[Online]. Available: http://arxiv.org/abs/2209.04444
V.[15] H. Sahin, I. Oztel, and G. Yolcu Oztel, “Human Monkeypox
Classification from Skin Lesion Images with Deep Pre-trained
Network using Mobile Application,” Journal of Medical
Systems 2022 46:11, vol. 46, no. 11, pp. 1–10, Oct. 2022, doi:
10.1007/S10916-022-01863-7.
[16] S. Woo, J. Park, J. Y. Lee, and I. S. Kweon, “CBAM:
Convolutional Block Attention Module,” Lecture Notes in
Computer Science (including subseries Lecture Notes in
Artificial Intelligence and Lecture Notes in Bioinformatics), vol.
11211 LNCS, pp. 3–19, Jul. 2018, doi:
10.48550/arxiv.1807.06521.