Open Access iconOpen Access

ARTICLE

crossmark

A Hybrid CNN-Transformer Framework for Normal Blood Cell Classification: Towards Automated Hematological Analysis

Osama M. Alshehri1, Ahmad Shaf2,*, Muhammad Irfan3,*, Mohammed M. Jalal4, Malik A. Altayar4, Mohammed H. Abu-Alghayth5, Humood Al Shmrany6, Tariq Ali7, Toufique A. Soomro8, Ali G. Alkhathami9

1 Department of Clinical Laboratory Sciences, College of Applied Medical Sciences, Najran University, Najran, 61441, Kingdom of Saudi Arabia
2 Department of Computer Science, COMSATS University Islamabad Sahiwal Campus, Sahiwal, 57000, Pakistan
3 Electrical Engineering Department, College of Engineering, Najran University, Najran, 61441, Kingdom of Saudi Arabia
4 Department of Medical Laboratory Technology, Faculty of Applied Medical Sciences, University of Tabuk, Tabuk, 71491, Kingdom of Saudi Arabia
5 Department of Medical Laboratory Sciences, College of Applied Medical Sciences, University of Bisha, Bisha, 67714, Kingdom of Saudi Arabia
6 Department of Medical Laboratory, College of Applied Medical Sciences, Prince Sattam bin Abdulaziz University, Alkharj, 11942, Kingdom of Saudi Arabia
7 Artificial Intelligence and Sensing Technologies (AIST) Research Center Tabuk, University of Tabuk, Tabuk, 71491, Kingdom of Saudi Arabia
8 Artificial Intelligence and Cyber Futures Institute, Charles University, Bathurst, NSW 2795, Australia
9 Department of Clinical Laboratory Sciences, College of Applied Medical Sciences, King Khalid University, Abha, 62217, Kingdom of Saudi Arabia

* Corresponding Authors: Ahmad Shaf. Email: email; Muhammad Irfan. Email: email

(This article belongs to the Special Issue: Artificial Intelligence Models in Healthcare: Challenges, Methods, and Applications)

Computer Modeling in Engineering & Sciences 2025, 144(1), 1165-1196. https://doi.org/10.32604/cmes.2025.067150

Abstract

Background: Accurate classification of normal blood cells is a critical foundation for automated hematological analysis, including the detection of pathological conditions like leukemia. While convolutional neural networks (CNNs) excel in local feature extraction, their ability to capture global contextual relationships in complex cellular morphologies is limited. This study introduces a hybrid CNN-Transformer framework to enhance normal blood cell classification, laying the groundwork for future leukemia diagnostics. Methods: The proposed architecture integrates pre-trained CNNs (ResNet50, EfficientNetB3, InceptionV3, CustomCNN) with Vision Transformer (ViT) layers to combine local and global feature modeling. Four hybrid models were evaluated on the publicly available Blood Cell Images dataset from Kaggle, comprising 17,092 annotated normal blood cell images across eight classes. The models were trained using transfer learning, fine-tuning, and computational optimizations, including cross-model parameter sharing to reduce redundancy by reusing weights across CNN backbones and attention-guided layer pruning to eliminate low-contribution layers based on attention scores, improving efficiency without sacrificing accuracy. Results: The InceptionV3-ViT model achieved a weighted accuracy of 97.66% (accounting for class imbalance by weighting each class’s contribution), a macro F1-score of 0.98, and a ROC-AUC of 0.998. The framework excelled in distinguishing morphologically similar cell types demonstrating robustness and reliable calibration (ECE of 0.019). The framework addresses generalization challenges, including class imbalance and morphological similarities, ensuring robust performance across diverse cell types. Conclusion: The hybrid CNN-Transformer framework significantly improves normal blood cell classification by capturing multi-scale features and long-range dependencies. Its high accuracy, efficiency, and generalization position it as a strong baseline for automated hematological analysis, with potential for extension to leukemia subtype classification through future validation on pathological samples.

Keywords

Acute leukemia; automated diagnosis; blood cell classification; convolution neural networks; deep learning; fine-tuning; hematologic malignancy; hybrid deep learning architecture; leukemia subtype classification; medical image analysis; transfer learning; vision transformers

Cite This Article

APA Style
Alshehri, O.M., Shaf, A., Irfan, M., Jalal, M.M., Altayar, M.A. et al. (2025). A Hybrid CNN-Transformer Framework for Normal Blood Cell Classification: Towards Automated Hematological Analysis. Computer Modeling in Engineering & Sciences, 144(1), 1165–1196. https://doi.org/10.32604/cmes.2025.067150
Vancouver Style
Alshehri OM, Shaf A, Irfan M, Jalal MM, Altayar MA, Abu-Alghayth MH, et al. A Hybrid CNN-Transformer Framework for Normal Blood Cell Classification: Towards Automated Hematological Analysis. Comput Model Eng Sci. 2025;144(1):1165–1196. https://doi.org/10.32604/cmes.2025.067150
IEEE Style
O. M. Alshehri et al., “A Hybrid CNN-Transformer Framework for Normal Blood Cell Classification: Towards Automated Hematological Analysis,” Comput. Model. Eng. Sci., vol. 144, no. 1, pp. 1165–1196, 2025. https://doi.org/10.32604/cmes.2025.067150



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
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.
  • 1408

    View

  • 711

    Download

  • 0

    Like

Share Link