Performance Comparison of YOLOv8 and DETR in White Blood Cell Detection

Authors

  • Andrian Rakhmatsyah Telkom University
  • Maman Abdurohman Telkom University
  • Bayu Erfianto Telkom University
  • Delita Prihatni Telkom University

DOI:

https://doi.org/10.29207/resti.v9i4.6864

Keywords:

data augmentation, DeTR, hematology, medical image analysis, object detection, Transformer, white blood cell classification, YOLOv8

Abstract

Automated detection and classification of white blood cells (WBCs) from microscopic images play a vital role in supporting the diagnosis of hematological diseases. Accurate and robust object detection algorithms are essential for handling interclass similarities and imbalanced datasets. This study aims to evaluate and compare the performance of two modern object detection algorithms—Detection Transformer (DeTR) and YOLOv8—in performing multiclass WBC classification using public datasets from various sources with diverse visual characteristics. Five experimental scenarios were designed based on varying class distributions and data augmentation techniques, including horizontal/vertical flipping and random rotation. Both methods were trained and evaluated on the same dataset partitions, and their performances were assessed using the following standard metrics: precision, recall, and F1-score for each WBC class. The results show that YOLOv8 consistently achieved superior and more stable performance across all scenarios, with average F1-scores close to 1.00 even in augmented and imbalanced conditions. In contrast, DeTR performed competitively in balanced scenarios but showed lower consistency, particularly in classes such as Neutrophil and Monocyte. Data augmentation positively affected both models, although the gains were more prominent in YOLOv8. This study highlights the strong potential of YOLOv8 in real-time WBC classification tasks and presents DeTR as a viable yet less-optimized approach for this application. These findings contribute to the advancement of medical image-based object detection and offer valuable insights into the selection of appropriate algorithms for hematological image analysis

Downloads

Download data is not yet available.

References

M. Li et al., “Peripheral Blood Leukocyte Detection Based on an Improved Detection Transformer Algorithm,” Sensors, vol. 23, no. 16, 2023, doi: 10.3390/s23167226.

X. Zheng, P. Tang, L. Ai, D. Liu, Y. Zhang, and B. Wang, “White blood cell detection using saliency detection and CenterNet: A two-stage approach,” J Biophotonics, vol. 16, no. 3, p. e202200174, Mar. 2023, doi: 10.1002/JBIO.202200174.

R. Biswal, P. K. Mallick, A. R. Panda, G. S. Chae, and A. Mishra, “White Blood Cell Classification Using Pre-Trained Deep Neural Networks and Transfer Learning,” 2023 1st International Conference on Circuits, Power, and Intelligent Systems, CCPIS 2023, 2023, doi: 10.1109/CCPIS59145.2023.10291642.

Y. Jiang et al., “Automatic recognition of white blood cell images with memory efficient superpixel metric GNN: SMGNN,” Mathematical Biosciences and Engineering 2024 2:2163, vol. 21, no. 2, pp. 2163–2188, 2024, doi: 10.3934/MBE.2024095.

“Automated Identification and Classification of White Blood Cells (Leukocytes) in Digital Microscopic Images.” Accessed: Feb. 26, 2025. [Online]. Available: https://www.ijcaonline.org/specialissues/rtippr/number2/977-100/

C. Shyalika and P. Kumara, “Morphological Analysis and Diagnosis of Human Leukemic Cells Using Image Processing: A Review,” 2022 2nd International Conference on Computer, Control and Robotics, ICCCR 2022, pp. 251–257, 2022, doi: 10.1109/ICCCR54399.2022.9790102.

J. Zhao, M. Zhang, Z. Zhou, J. Chu, and F. Cao, “Automatic detection and classification of leukocytes using convolutional neural networks,” Med Biol Eng Comput, vol. 55, no. 8, pp. 1287–1301, Aug. 2017, doi: 10.1007/S11517-016-1590-X.

H. Kutlu, E. Avci, and F. Özyurt, “White blood cells detection and classification based on regional convolutional neural networks,” Med Hypotheses, vol. 135, p. 109472, Feb. 2020, doi: 10.1016/J.MEHY.2019.109472.

S. Khan, M. Sajjad, N. Abbas, J. Escorcia-Gutierrez, M. Gamarra, and K. Muhammad, “Efficient leukocytes detection and classification in microscopic blood images using convolutional neural network coupled with a dual attention network,” Comput Biol Med, vol. 174, p. 108146, May 2024, doi: 10.1016/J.COMPBIOMED.2024.108146.

V. Shalini and K. S. A. Viji, “AUTOMATIC DETECTION AND CLASSIFICATION OF LEUKEMIA FROM BLOOD SMEAR IMAGE USING SENET CONVOLUTIONAL NEURAL NETWORK,” J Theor Appl Inf Technol, vol. 101, no. 15, pp. 6065 – 6075, 2023, [Online]. Available: https://www.scopus.com/inward/record.uri?eid=2-s2.0-85172690043&partnerID=40&md5=9b0a734b7dbb1a7ac70c996d8b9f3512

B. Liu, “Blood Cell Count and Detection Method Based on YOLO,” Highlights in Science, Engineering and Technology, vol. 27, pp. 594–599, Dec. 2022, doi: 10.54097/hset.v27i.3822.

M. Sharif et al., “Recognition of different types of leukocytes using YOLoV2 and optimized bag-of-features,” IEEE Access, vol. 8, pp. 167448–167459, 2020, doi: 10.1109/ACCESS.2020.3021660.

L. D. Trong, T. P. Thanh, H. P. Manh, and D. N. Minh, “Yolov4 in White Blood Cell Classification,” pp. 387–400, 2023, doi: 10.1007/978-981-19-6004-8_31.

N. H. Harun and N. Fared, “An Experiment on Lung Disease Classification using YOLOv8,” Applied Mathematics and Computational Intelligence (AMCI), vol. 13, no. 3, pp. 176–185, Oct. 2024, doi: 10.58915/AMCI.V13I3.626.

N. Palanivel, S. Deivanai, G. Lakshmi Priya, B. Sindhuja, and M. Shamrin Millet, “The Art of YOLOv8 Algorithm in Cancer Diagnosis using Medical Imaging,” 2023 International Conference on System, Computation, Automation and Networking, ICSCAN 2023, 2023, doi: 10.1109/ICSCAN58655.2023.10395046.

S. Albahli, “A Robust YOLOv8-Based Framework for Real-Time Melanoma Detection and Segmentation with Multi-Dataset Training,” Diagnostics 2025, Vol. 15, Page 691, vol. 15, no. 6, p. 691, Mar. 2025, doi: 10.3390/DIAGNOSTICS15060691.

H. Lou et al., “DC-YOLOv8: Small-Size Object Detection Algorithm Based on Camera Sensor,” Electronics 2023, Vol. 12, Page 2323, vol. 12, no. 10, p. 2323, May 2023, doi: 10.3390/ELECTRONICS12102323.

W. Jianjing, X. Baolin, Z. Shurong, and Z. Xin, “Complete Blood Cell Detection Based on Improved YOLOV8,” Proceedings of the IEEE International Conference on Software Engineering and Service Sciences, ICSESS, pp. 148–152, 2024, doi: 10.1109/ICSESS62520.2024.10719382.

M. Kang, C.-M. Ting, F. F. Ting, and R. Phan, “CST-YOLO: A Novel Method for Blood Cell Detection Based on Improved YOLOv7 and CNN-Swin Transformer,” 2023.

Y. Guo and M. Zhang, “Blood Cell Detection Method Based on Improved YOLOv5,” IEEE Access, vol. 11, pp. 67987–67995, 2023, doi: 10.1109/ACCESS.2023.3290905.

C. Matsoukas, J. F. Haslum, M. Sorkhei, M. Söderberg, and K. Smith, “Pretrained ViTs Yield Versatile Representations For Medical Images,” Mar. 2023, Accessed: Feb. 26, 2025. [Online]. Available: https://arxiv.org/abs/2303.07034v3

N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko, “End-to-End Object Detection with Transformers,” Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 12346 LNCS, pp. 213–229, 2020, doi: 10.1007/978-3-030-58452-8_13/FIGURES/8.

B. Leng, C. Wang, M. Leng, M. Ge, and W. Dong, “Deep learning detection network for peripheral blood leukocytes based on improved detection transformer,” Biomed Signal Process Control, vol. 82, p. 104518, Apr. 2023, doi: 10.1016/J.BSPC.2022.104518.

X. Zhu et al., “Deformable DETR: Deformable Transformers for End-to-End Object Detection,” Oct. 2020, Accessed: Jun. 09, 2023. [Online]. Available: https://arxiv.org/abs/2010.04159v4

N. Bayat, D. D. Davey, M. Coathup, and J. H. Park, “White Blood Cell Classification Using Multi-Attention Data Augmentation and Regularization,” Big Data and Cognitive Computing 2022, Vol. 6, Page 122, vol. 6, no. 4, p. 122, Oct. 2022, doi: 10.3390/BDCC6040122.

Y. Deng and H. Li, “Deep learning for few-shot white blood cell image classification and feature learning,” Comput Methods Biomech Biomed Eng Imaging Vis, vol. 11, no. 6, pp. 2081–2091, Nov. 2023, doi: 10.1080/21681163.2023.2219341.

H. Nozaka et al., “The Effect of Data Augmentation in Deep Learning Approach for Peripheral Blood Leukocyte Recognition,” Stud Health Technol Inform, vol. 290, pp. 273–277, Jun. 2022, doi: 10.3233/SHTI220077.

A. Acevedo, A. Merino, S. Alférez, Á. Molina, L. Boldú, and J. Rodellar, “A dataset for microscopic peripheral blood cell images for development of automatic recognition systems,” vol. 1, 2020, doi: 10.17632/SNKD93BNJR.1.

“Blood Cell Images.” Accessed: Jun. 17, 2025. [Online]. Available: https://www.kaggle.com/code/plavak10/blood-cell-images/input

“BCCD Dataset.” Accessed: Jul. 09, 2025. [Online]. Available: https://public.roboflow.com/object-detection/bccd

“Home - Raabin Health Database.” Accessed: Dec. 29, 2023. [Online]. Available: https://raabindata.com/

M. C. Hinojosa Lee, J. Braet, and J. Springael, “Performance Metrics for Multilabel Emotion Classification: Comparing Micro, Macro, and Weighted F1-Scores,” Applied Sciences (Switzerland), vol. 14, no. 21, p. 9863, Nov. 2024, doi: 10.3390/APP14219863/S1.

R. Padilla, S. L. Netto, and E. A. B. Da Silva, “A Survey on Performance Metrics for Object-Detection Algorithms,” International Conference on Systems, Signals, and Image Processing, vol. 2020-July, pp. 237–242, Jul. 2020, doi: 10.1109/IWSSIP48289.2020.9145130.

M. Nourelahi, L. Kotthoff, P. Chen, and A. Nguyen, “How explainable are adversarially-robust CNNs?,” May 2022, Accessed: Jun. 29, 2025. [Online]. Available: https://arxiv.org/pdf/2205.13042

A. Dosovitskiy et al., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” Oct. 2020, Accessed: Jun. 08, 2023. [Online]. Available: https://arxiv.org/abs/2010.11929v2

Z. Su, J. Guo, X. Yang, Q. Wang, F. Coenen, and K. Huang, “Navigating Distribution Shifts in Medical Image Analysis: A Survey,” Nov. 2024, Accessed: Jun. 24, 2025. [Online]. Available: https://arxiv.org/pdf/2411.05824

M. Sikaroudi, M. Hosseini, S. Rahnamayan, and H. R. Tizhoosh, “ALFA - Leveraging All Levels of Feature Abstraction for Enhancing the Generalization of Histopathology Image Classification Across Unseen Hospitals,” Proceedings - 2023 IEEE/CVF International Conference on Computer Vision Workshops, ICCVW 2023, pp. 2656–2665, 2023, doi: 10.1109/ICCVW60793.2023.00281.

S. Jiang, Z. Wu, H. Yang, K. Xiang, W. Ding, and Z. S. Chen, “A prior knowledge-guided distributionally robust optimization-based adversarial training strategy for medical image classification,” Inf Sci (N Y), vol. 673, p. 120705, Jul. 2024, doi: 10.1016/J.INS.2024.120705.

C. Schultz, “The neutrophil,” General Internal Medicine and Clinical Innovations, vol. 5, no. 3, 2020, doi: 10.15761/GIMCI.1000198.

I. Pacal, “A novel Swin transformer approach utilizing residual multi-layer perceptron for diagnosing brain tumors in MRI images,” International Journal of Machine Learning and Cybernetics, vol. 15, no. 9, pp. 3579–3597, Sep. 2024, doi: 10.1007/S13042-024-02110-W/METRICS.

Z. Liu et al., “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows,” Proceedings of the IEEE International Conference on Computer Vision, pp. 9992–10002, 2021, doi: 10.1109/ICCV48922.2021.00986.

T. Y. Kim, A. Niaz, J. S. Choi, and K. N. Choi, “One-Stage Detection Model Based on Swin Transformer,” IEEE Access, vol. 12, pp. 60960–60972, 2024, doi: 10.1109/ACCESS.2024.3393152.

Downloads

Published

2025-08-23

Issue

Section

Computer Vision and Pattern Recognition

How to Cite

Rakhmatsyah, A., Abdurohman, M. ., Erfianto, B., & Prihatni, D. (2025). Performance Comparison of YOLOv8 and DETR in White Blood Cell Detection. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 9(4), 923-934. https://doi.org/10.29207/resti.v9i4.6864