A Patch-based Microscopic Image Analysis for Visceral Leishmaniasis Screening Using a Deep Metric Learning Approach

  • Carllos Eduardo Ferreira Lopes UFAL
  • Eduardo Lisboa UFAL
  • Yanka Ribeiro UFAL
  • Fabiane Queiroz UFAL


Human Visceral Leishmaniasis (VL) is a fatal disease in over 95% of untreated cases and predominantly affects populations with limited access to healthcare. Parasitological techniques are the gold standard for diagnosing VL. It involves the direct microscopic examination of the parasite amastigotes approximately 2–4µ m in diameter. However, this process can be time-consuming and labor-intensive, necessitating a high level of expertise. We propose a novel approach to the detection of these amastigotes by combining deep metric learning with supervised classification techniques. We outperform the state-of-art for this detection problem achieving an f1-score of approximately 99% by tackling poor segmentation and class imbalance drawbacks.


Chicco, D. and Jurman, G. (2020). The advantages of the matthews correlation coefficient (mcc) over f1 score and accuracy in binary classification evaluation. BMC genomics, 21(1):1–13.

Elmahallawy, E. K., Sampedro, A. M., Rodriguez-Granger, J., Hoyos-Mallecot, Y., Agil, A., Navarro, J. M., and Fernández, J. (2014). Diagnosis of leishmaniasis. Journal of Infection in Developing Countries, 8(8):961 – 972.

Farahi, M., Rabbani, H., Talebi, A., Sarrafzadeh, O., and Ensafi, S. (2015). Automatic segmentation of Leishmania parasite in microscopic images using a modified CV level set method. In Wang, Y. and Jiang, X., editors, Seventh International Conference on Graphic and Image Processing (ICGIP 2015), volume 9817, page 98170K. International Society for Optics and Photonics, SPIE.

Fuhad, K. M. F., Tuba, J. F., Sarker, M. R. A., Momen, S., Mohammed, N., and Rahman, T. (2020). Deep learning based automatic malaria parasite detection from blood smear and its smartphone based application. Diagnostics, 10(5).

Gonçalves, C., Borges, A., Dias, V., Marques, J., Aguiar, B., Costa, C., and Silva, R. (2023). Detection of human visceral leishmaniasis parasites in microscopy images from bone marrow parasitological examination. Applied Sciences, 13(14).

Górriz, M., Aparicio, A., Raventós, B., Vilaplana, V., Sayrol, E., and López-Codina, D. (2018). Leishmaniasis parasite segmentation and classification using deep learning. In Perales, F. J. and Kittler, J., editors, Articulated Motion and Deformable Objects, pages 53–62, Cham. Springer International Publishing.

Isaza-Jaimes, A., Bermúdez, V., Bravo, A., Castrillo, J. S., Lalinde, J. D. H., Fossi, C. A., Flórez, A., and Rodríguez, J. E. (2021). A computational approach for Leishmania genus protozoa detection in bone marrow samples from patients with visceral Leishmaniasis.

Lima, T., Catiely, C., Sousa, V., Veras, R., and Araújo, F. (2023). Aprendizado profundo para detecção de cálculos renais em imagens de tomografia computadorizada. In Anais do XXIII Simpósio Brasileiro de Computação Aplicada à Saúde, pages 47–58, Porto Alegre, RS, Brasil. SBC.

Reimão, J. Q., Coser, E. M., Lee, M. R., and Coelho, A. C. (2020). Laboratory diagnosis of cutaneous and visceral leishmaniasis: Current and future methods. Microorganisms, 8(11).

Ronneberger, O., Fischer, P., and Brox, T. (2015). U-net: Convolutional networks for biomedical image segmentation. In Navab, N., Hornegger, J., Wells, W. M., and Frangi, A. F., editors, Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, pages 234–241, Cham. Springer International Publishing.

Salazar, J., Vera, M., Huérfano, Y., Vera, M. I., Gelvez-Almeida, E., and Valbuena, O. (2019). Semi-automatic detection of the evolutionary forms of visceral leishmaniasis in microscopic blood smears. Journal of Physics: Conference Series, 1386(1):012135.

Santos, P., Brito, V., Filho, A. C., Sousa, A., Diniz, J., and Luz, D. (2023). Efficientbacillus: uma arquitetura profunda para detecção dos bacilos de koch. In Anais do XXIII Simpósio Brasileiro de Computação Aplicada à Saúde, pages 198–209, Porto Alegre, RS, Brasil. SBC.

Schroff, F., Kalenichenko, D., and Philbin, J. (2015). Facenet: A unified embedding for face recognition and clustering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

Soberanis-Mukul, R., Uc-Cetina, V., Brito-Loeza, C., and Ruiz-Piña, H. (2013). An automatic algorithm for the detection of trypanosoma cruzi parasites in blood sample images. Computer Methods and Programs in Biomedicine, 112(3):633 – 639.

Sohn, K. (2016). Improved deep metric learning with multi-class n-pair loss objective. In Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I., and Garnett, R., editors, Advances in Neural Information Processing Systems 29, pages 1857–1865. Curran Associates, Inc.

Sun, Y., Cheng, C., Zhang, Y., Zhang, C., Zheng, L., Wang, Z., and Wei, Y. (2020). Circle loss: A unified perspective of pair similarity optimization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 6398–6407.

Van der Laak, J., Litjens, G., and Ciompi, F. (2021). Deep learning in histopathology: the path to the clinic. Nature Medicine, 27(5):775–784.

Wang, X., Han, X., Huang, W., Dong, D., and Scott, M. R. (2019). Multi-similarity loss with general pair weighting for deep metric learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5022–5030.

WHO TEAM, C. o. N. T. D. (2023). Operational manual on leishmaniasis vector control, surveillance, monitoring and evaluation. page 119.

Yang, F., Poostchi, M., Yu, H., Zhou, Z., Silamut, K., Yu, J., Maude, R. J., Jaeger, S., and Antani, S. (2020). Deep learning for smartphone-based malaria parasite detection in thick blood smears. IEEE Journal of Biomedical and Health Informatics, 24(5):1427–1438.

Zhang, C., Jiang, H., Jiang, H., Xi, H., Chen, B., Liu, Y., Juhas, M., Li, J., and Zhang, Y. (2022). Deep learning for microscopic examination of protozoan parasites. Computational and Structural Biotechnology Journal, 20:1036–1043.

Zhang, Z. and Peng, H. (2019). Deeper and wider siamese networks for real-time visual tracking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
LOPES, Carllos Eduardo Ferreira; LISBOA, Eduardo; RIBEIRO, Yanka; QUEIROZ, Fabiane. A Patch-based Microscopic Image Analysis for Visceral Leishmaniasis Screening Using a Deep Metric Learning Approach. In: SIMPÓSIO BRASILEIRO DE COMPUTAÇÃO APLICADA À SAÚDE (SBCAS), 24. , 2024, Goiânia/GO. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 166-177. ISSN 2763-8952. DOI: https://doi.org/10.5753/sbcas.2024.2117.