Confidence-Calibrated Hybrid CNN–Vision Transformer Ensemble For Reliable Monkeypox Classification
DOI:
https://doi.org/10.29284/0n3hnv75Keywords:
Monkeypox, MPOX, Deep Learning, Ensemble Learning, Confidence-calibrationAbstract
Accurate and rapid detection of Monkeypox (Mpox) remains a global priority, particularly following the 2022 outbreak that significantly expanded its geographical spread. While polymerase chain reaction (PCR) testing is the clinical gold standard, its reliance on specialized laboratory infrastructure limits timely diagnosis in resource-constrained settings. Recent advances in deep learning have shown strong potential for automated skin-lesion classification; however, challenges such as limited datasets, class imbalance, model overconfidence, and poor generalizability persist. In this study, we propose an Adaptive Weighted Deep Ensemble that combines four different backbone models: MobileNetV2, ResNet50, ConvNeXt-Tiny, and Vision Transformer (ViT-B/16). This approach aims to improve the robustness and reliability of Monkeypox detection from skin images. The ensemble uses learnable logit-level fusion, which allows the model to adjust the weight of each sub-network's contribution during training. To tackle class imbalance, we employed weighted random sampling and a sophisticated augmentation method based on Albumentations. We optimized the system with Focal Loss to increase sensitivity to less common and difficult-to-classify lesion types.
Evaluated on the Monkeypox Skin Image Dataset (MSID), the proposed model achieved an accuracy of 99.42%. It outperformed existing CNN and hybrid architectures. Class-wise analysis showed high precision and recall across all four categories: Monkeypox, Measles, Chickenpox, and Normal. This indicates a strong ability to differentiate between them. To improve trust in the model, temperature scaling was used for confidence calibration. This reduced the Expected Calibration Error (ECE) and better aligned predicted probabilities with actual outcomes. Additionally, Grad-CAM visualizations confirmed that the ensemble focuses on important lesion areas, which supports interpretability and practical use in clinics. Overall, the calibrated ensemble framework offers a reliable, clear, and highly accurate solution for Monkeypox screening in real-world and low-resource settings. It has potential for wider use in digital health platforms.
References
1. I. H. Damon, “Monkeypox,” Clin Infect Dis., vol. 58, no. 2, pp. 260–267, 2014.
2. World Health Organization, “Monkeypox,” WHO Fact Sheet, May 2023. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/monkeypox
3. M. Zahmatyar et al., “Human monkeypox: History, presentations, transmission, epidemiology, diagnosis, treatment, and prevention,” Frontiers in Medicine, vol. 10, p. 1157670, Jul. 2023, doi: 10.3389/fmed.2023.1157670.
4. Yinka-Ogunleye, A., et al., “Outbreak of human monkeypox in Nigeria in 2017–18: A clinical and epidemiological report,” The Lancet Infectious Diseases, vol. 19, no. 8, pp. 872–879, 2019.
5. Li, Y., Zhao, H., Wilkins, K., et al., “Real-time PCR assays for the specific detection of monkeypox virus West African and Congo Basin strain DNA,” J Virol Methods, vol. 169, no. 1, pp. 223–227, 2010.
6. Durski, K. N., McCollum, A. M., Nakazawa, Y., et al., “Emergence of monkeypox — West and Central Africa, 1970–2017,” MMWR Morb Mortal Wkly Rep, vol. 67, pp. 306–310, 2018.
7. Esteva, A., Kuprel, B., Novoa, R. A., et al., “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, vol. 542, pp. 115–118, 2017.
8. Khan, A., Khan, M. S., Ahmed, A. M., “Monkeypox diagnosis using deep learning models and skin lesion images: A comparative study,” IEEE Access, vol. 11, pp. 45610–45621, 2023. doi: 10.1109/ACCESS.2023.3275587
9. V. 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, vol. 46, no. 11, p. 79, Nov. 2022, doi: 10.1007/s10916-022-01829-7.
10. M. M. Ahsan, M. R. Uddin, M. Farjana, A. N. Sakib, K. A. Momin, and S. A. Luna, “Image data collection and implementation of deep learning-based model in detecting Monkeypox disease using modified VGG16,” arXiv preprint arXiv:2206.01862, 2022. [Online]. Available: https://arxiv.org/abs/2206.01862
11. D. Bala, M. S. Hossain, M. A. Hossain, M. I. Abdullah, M. M. Rahman, B. Manavalan, N. Gu, M. S. Islam, and Z. Huang, ‘‘MonkeyNet: A robust deep convolutional neural network for monkeypox disease detection and classification,’’ Neural Netw., vol. 161, pp. 757–775, Apr. 2023.
12. A. D. Raha, M. Gain, R. Debnath, A. Adhikary, Y. Qiao, M. M. Hassan, A. K. Bairagi, and S. M. S. Islam, ‘‘Attention to monkeypox: An interpretable monkeypox detection technique using attention mechanism,’’ IEEE Access, vol. 12, pp. 51942–51965, 2024.
13. G. Haixiang, L. Yijing, J. Shang, G. Mingyun, H. Yuanyue, and G. Bing, “Learning from class-imbalanced data: Review of methods and applications,” Expert Systems with Applications, vol. 73, pp. 220–239, 2017, doi: 10.1016/j.eswa.2016.12.035.
14. Johnson, J. M., & Khoshgoftaar, T. M. (2019). Survey on deep learning with class imbalance. Journal of Big Data, 6(1), 1–54. https://doi.org/10.1186/s40537-019-0192-5
15. Buslaev, A., Iglovikov, V. I., Khvedchenya, E., Parinov, A., Druzhinin, M., & Kalinin, A. A. (2020). Albumentations: Fast and Flexible Image Augmentations. Information, 11(2), 125. https://doi.org/10.3390/info11020125
16. Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., & Chen, L. C. (2018). MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4510–4520. https://doi.org/10.1109/CVPR.2018.00474
17. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep Residual Learning for Image Recognition. In CVPR 2016, 770–778. https://doi.org/10.1109/CVPR.2016.90
18. Liu, Z., Mao, H., Wu, C. Y., Feichtenhofer, C., Darrell, T., & Xie, S. (2022). A ConvNet for the 2020s. In CVPR 2022, 11976–11986. https://doi.org/10.1109/CVPR52688.2022.01170
19. Dosovitskiy, A., et al. (2020). An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv:2010.11929
20. Zhou, Z. H. (2012). Ensemble Methods: Foundations and Algorithms. CRC press.
21. Lakshminarayanan, B., Pritzel, A., & Blundell, C. (2017). Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. NeurIPS.
22. D’Ascoli, S., Touvron, H., Leavitt, M. L., et al. (2021). ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases. ICML.
23. Opitz, D., & Maclin, R. (1999). Popular ensemble methods: An empirical study. Journal of artificial intelligence research, 11, 169-198.
24. Johnson, J. M., & Khoshgoftaar, T. M. (2019). Survey on deep learning with class imbalance. Journal of big data, 6(1), 1-54.
25. Lin, T.-Y., Goyal, P., Girshick, R., He, K., & Dollár, P. (2017). Focal Loss for Dense Object Detection. ICCV.
26. Niculescu-Mizil, A., & Caruana, R. (2005). Predicting Good Probabilities with Supervised Learning. ICML.
27. Jiang, H., Kim, B., Guan, M. Y., & Gupta, M. (2018). To Trust or Not To Trust A Classifier. NeurIPS.
28. Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On Calibration of Modern Neural Networks. ICML.
29. Naeini, M. P., Cooper, G. F., & Hauskrecht, M. (2015). Obtaining Well Calibrated Probabilities Using Bayesian Binning. AAAI.
30. Holzinger, A., Biemann, C., Pattichis, C. S., & Kell, D. B. (2017). What do we need to build explainable AI systems for the medical domain? arXiv preprint arXiv:1712.09923. https://arxiv.org/abs/1712.09923
31. Attallah O. MonDiaL-CAD: Monkeypox diagnosis via selected hybrid CNNs unified with feature selection and ensemble learning. Digit Health. 2023; 9:20552076231180056.
32. Asif S, Zhao M, Li Y, Tang F, Zhu Y. CFI-Net: A Choquet Fuzzy Integral based Ensemble Network with PSO-Optimized Fuzzy Measures for Diagnosing Multiple Skin Diseases Including Mpox. IEEE J Biomed Health Inform. 2024;28:5573–86.
33. Saha, D. K., Rafi, S., Mridha, M. F., Alfarhood, S., Safran, M., Kabir, M. M., … & Dey, N. (2025). Mpox-XDE: an ensemble model utilizing deep CNN and explainable AI for monkeypox detection and classification. BMC Infectious Diseases, 25, 403. https://doi.org/10.1186/s12879-025-10811-y
34. https://www.kaggle.com/datasets/dipuiucse/monkeypoxskinimagedataset
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

