{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,24]],"date-time":"2026-09-24T00:22:07Z","timestamp":1790209327240,"version":"4.1.0"},"reference-count":43,"publisher":"MDPI AG","issue":"14","license":[{"start":{"date-parts":[[2023,7,24]],"date-time":"2023-07-24T00:00:00Z","timestamp":1690156800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Diagnostics"],"abstract":"<jats:p>White blood cells (WBCs) are crucial components of the immune system that play a vital role in defending the body against infections and diseases. The identification of WBCs subtypes is useful in the detection of various diseases, such as infections, leukemia, and other hematological malignancies. The manual screening of blood films is time-consuming and subjective, leading to inconsistencies and errors. Convolutional neural networks (CNN)-based models can automate such classification processes, but are incapable of capturing long-range dependencies and global context. This paper proposes an explainable Vision Transformer (ViT) model for automatic WBCs detection from blood films. The proposed model uses a self-attention mechanism to extract features from input images. Our proposed model was trained and validated on a public dataset of 16,633 samples containing five different types of WBCs. As a result of experiments on the classification of five different types of WBCs, our model achieved an accuracy of 99.40%. Moreover, the model\u2019s examination of misclassified test samples revealed a correlation between incorrect predictions and the presence or absence of granules in the cell samples. To validate this observation, we divided the dataset into two classes, Granulocytes and Agranulocytes, and conducted a secondary training process. The resulting ViT model, trained for binary classification, achieved impressive performance metrics during the test phase, including an accuracy of 99.70%, recall of 99.54%, precision of 99.32%, and F-1 score of 99.43%. To ensure the reliability of the ViT model\u2019s, we employed the Score-CAM algorithm to visualize the pixel areas on which the model focuses during its predictions. Our proposed method is suitable for clinical use due to its explainable structure as well as its superior performance compared to similar studies in the literature. The classification and localization of WBCs with this model can facilitate the detection and reporting process for the pathologist.<\/jats:p>","DOI":"10.3390\/diagnostics13142459","type":"journal-article","created":{"date-parts":[[2023,7,25]],"date-time":"2023-07-25T01:27:32Z","timestamp":1690248452000},"page":"2459","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":41,"title":["An Explainable Vision Transformer Model Based White Blood Cells Classification and Localization"],"prefix":"10.3390","volume":"13","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-5628-3543","authenticated-orcid":false,"given":"Oguzhan","family":"Katar","sequence":"first","affiliation":[{"name":"Department of Software Engineering, Firat University, Elazig 23119, Turkey"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ozal","family":"Yildirim","sequence":"additional","affiliation":[{"name":"Department of Software Engineering, Firat University, Elazig 23119, Turkey"},{"name":"Department of Artificial Intelligence and Data Engineering, Firat University, Elazig 23119, Turkey"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,7,24]]},"reference":[{"key":"ref_1","unstructured":"Al-Dulaimi, K.A.K., Banks, J., Chandran, V., Tomeo-Reyes, I., and Nguyen Thanh, K. (2018). Microscopy Science: Last Approaches on Educational Programs and Applied Research (Microscopy Book Series, 8), Formatex Research Center."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Ahmad, Z., Shah, T.A., Reddy, K.P., Ghosh, S., Panpatil, V., Kottoru, S.K., Rayees, S., and Rao, D.R. (2022). Fundamentals and Advances in Medical Biotechnology, Springer.","DOI":"10.1007\/978-3-030-98554-7_6"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"490","DOI":"10.30574\/wjarr.2021.12.3.0745","article-title":"Basic Concepts in Clinical Immunology: A Review","volume":"12","author":"Kiboneka","year":"2021","journal-title":"World J. Adv. Res. Rev."},{"key":"ref_4","unstructured":"Tripathi, C. (2022). An Interplay of Cellular and Molecular Components of Immunology, CRC Press."},{"key":"ref_5","unstructured":"Otieno, F., and Kyalo, C. (2022). Basic and Clinical Aspects of Interferon Gamma, IntechOpen."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"2694","DOI":"10.1016\/j.mayocp.2021.04.025","article-title":"Eosinophils in Health and Disease: A State-of-the-Art Review","volume":"Volume 96","author":"Wechsler","year":"2021","journal-title":"Proceedings of the Mayo Clinic Proceedings"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"2420","DOI":"10.1111\/all.14747","article-title":"Basophil Activation Test: Mechanisms and Considerations for Use in Clinical Trials and Clinical Practice","volume":"76","author":"Santos","year":"2021","journal-title":"Allergy"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"625","DOI":"10.1016\/j.cpha.2019.02.010","article-title":"Diagnostics for White Blood Cell Abnormalities: Leukocytosis and Leukopenia","volume":"4","author":"Parente","year":"2019","journal-title":"Physician Assist. Clin."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Agnello, L., Giglio, R.V., Bivona, G., Scazzone, C., Gambino, C.M., Iacona, A., Ciaccio, A.M., lo Sasso, B., and Ciaccio, M. (2021). The Value of a Complete Blood Count (CBC) for Sepsis Diagnosis and Prognosis. Diagnostics, 11.","DOI":"10.3390\/diagnostics11101881"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Wang, Q., Bi, S., Sun, M., Wang, Y., Wang, D., and Yang, S. (2019). Deep Learning Approach to Peripheral Leukocyte Recognition. PLoS ONE, 14.","DOI":"10.1371\/journal.pone.0218808"},{"key":"ref_11","first-page":"290","article-title":"Segmentation of White Blood Cell, Nucleus and Cytoplasm in Digital Haematology Microscope Images: A Review\u2014Challenges, Current and Future Potential Techniques","volume":"14","author":"Khamael","year":"2020","journal-title":"IEEE Rev. Biomed. Eng."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"37","DOI":"10.24138\/jcomss.v16i1.818","article-title":"Improved White Blood Cells Classification Based on Pre-Trained Deep Learning Models","volume":"16","author":"Mohamed","year":"2020","journal-title":"J. Commun. Softw. Syst."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"378","DOI":"10.1016\/j.irbm.2020.08.005","article-title":"White Blood Cells Image Classification Using Deep Learning with Canonical Correlation Analysis","volume":"42","author":"Patil","year":"2021","journal-title":"IRBM"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"1517","DOI":"10.1007\/s11063-020-10321-9","article-title":"A Novel Solution of Using Deep Learning for White Blood Cells Classification: Enhanced Loss Function with Regularization and Weighted Loss (ELFRWL)","volume":"52","author":"Basnet","year":"2020","journal-title":"Neural Process Lett."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Cheuque, C., Querales, M., Le\u00f3n, R., Salas, R., and Torres, R. (2022). An Efficient Multi-Level Convolutional Neural Network Approach for White Blood Cells Classification. Diagnostics, 12.","DOI":"10.3390\/diagnostics12020248"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"7384131","DOI":"10.1155\/2022\/7384131","article-title":"Deep Learning Model for the Automatic Classification of White Blood Cells","volume":"2022","author":"Sharma","year":"2022","journal-title":"Comput. Intell. Neurosci."},{"key":"ref_17","unstructured":"Jung, C., Abuhamad, M., Alikhanov, J., Mohaisen, A., Han, K., and Nyang, D. (2019). W-Net: A CNN-Based Architecture for White Blood Cells Image Classification. arXiv."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Rustam, F., Aslam, N., de La Torre D\u00edez, I., Khan, Y.D., Maz\u00f3n, J.L.V., Rodr\u00edguez, C.L., and Ashraf, I. (2022). White Blood Cell Classification Using Texture and RGB Features of Oversampled Microscopic Images. Healthcare, 10.","DOI":"10.3390\/healthcare10112230"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Chola, C., Muaad, A.Y., bin Heyat, M.B., Benifa, J.V.B., Naji, W.R., Hemachandran, K., Mahmoud, N.F., Samee, N.A., Al-Antari, M.A., and Kadah, Y.M. (2022). BCNet: A Deep Learning Computer-Aided Diagnosis Framework for Human Peripheral Blood Cell Identification. Diagnostics, 12.","DOI":"10.3390\/diagnostics12112815"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Ahmad, R., Awais, M., Kausar, N., and Akram, T. (2023). White Blood Cells Classification Using Entropy-Controlled Deep Features Optimization. Diagnostics, 13.","DOI":"10.3390\/diagnostics13030352"},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Bairaboina, S.S.R., and Battula, S.R. (2023). Ghost-ResNeXt: An Effective Deep Learning Based on Mature and Immature WBC Classification. Appl. Sci., 13.","DOI":"10.3390\/app13064054"},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Bhojanapalli, S., Chakrabarti, A., Glasner, D., Li, D., Unterthiner, T., and Veit, A. (2021, January 10\u201317). Understanding Robustness of Transformers for Image Classification. Proceedings of the IEEE\/CVF International Conference on Computer Vision, Montreal, BC, Canada.","DOI":"10.1109\/ICCV48922.2021.01007"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Bazi, Y., Bashmal, L., Rahhal, M.M.A., Dayil, R.A., and Ajlan, N.A. (2021). Vision Transformers for Remote Sensing Image Classification. Remote Sens., 13.","DOI":"10.3390\/rs13030516"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Chen, H., Wang, Y., Guo, T., Xu, C., Deng, Y., Liu, Z., Ma, S., Xu, C., Xu, C., and Gao, W. (2021, January 20\u201325). Pre-Trained Image Processing Transformer. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA.","DOI":"10.1109\/CVPR46437.2021.01212"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"245016","DOI":"10.1088\/1361-6560\/ac3dc8","article-title":"A Vision Transformer for Emphysema Classification Using CT Images","volume":"66","author":"Wu","year":"2021","journal-title":"Phys. Med. Biol."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Feng, H., Yang, B., Wang, J., Liu, M., Yin, L., Zheng, W., Yin, Z., and Liu, C. (2023). Identifying Malignant Breast Ultrasound Images Using ViT-Patch. Appl. Sci., 13.","DOI":"10.3390\/app13063489"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Ammar, L.B., Gasmi, K., and Ltaifa, I. (2022). Ben ViT-TB: Ensemble Learning Based ViT Model for Tuberculosis Recognition. Cybern. Syst., 1\u201320.","DOI":"10.1080\/01969722.2022.2162736"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Oztekin, F., Katar, O., Sadak, F., Yildirim, M., Cakar, H., Aydogan, M., Ozpolat, Z., Talo Yildirim, T., Yildirim, O., and Faust, O. (2023). An Explainable Deep Learning Model to Prediction Dental Caries Using Panoramic Radiograph Images. Diagnostics, 13.","DOI":"10.3390\/diagnostics13020226"},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"173","DOI":"10.1038\/s41551-018-0324-9","article-title":"An Explainable Deep-Learning Algorithm for the Detection of Acute Intracranial Haemorrhage from Small Datasets","volume":"3","author":"Lee","year":"2019","journal-title":"Nat. Biomed. Eng."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"1123","DOI":"10.1038\/s41598-021-04426-x","article-title":"A Large Dataset of White Blood Cells Containing Cell Locations and Types, along with Segmented Nuclei and Cytoplasm","volume":"12","author":"Kouzehkanan","year":"2022","journal-title":"Sci. Rep."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., and Funtowicz, M. (2020, January 16\u201320). Transformers: State-of-the-Art Natural Language Processing. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System demonstrations, Online.","DOI":"10.18653\/v1\/2020.emnlp-demos.6"},{"key":"ref_32","first-page":"5436","article-title":"Beyond Self-Attention: External Attention Using Two Linear Layers for Visual Tasks","volume":"45","author":"Guo","year":"2022","journal-title":"IEEE Trans. Pattern. Anal. Mach. Intell."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"131723","DOI":"10.1016\/j.jclepro.2022.131723","article-title":"A Novel Approach to Ultra-Short-Term Multi-Step Wind Power Predictions Based on Encoder\u2013Decoder Architecture in Natural Language Processing","volume":"354","author":"Wang","year":"2022","journal-title":"J. Clean Prod."},{"key":"ref_34","unstructured":"Thakur, P.S., Khanna, P., Sheorey, T., and Ojha, A. (2022). Explainable Vision Transformer Enabled Convolutional Neural Network for Plant Disease Identification: PlantXViT. arXiv."},{"key":"ref_35","unstructured":"Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., and Gelly, S. (2020). An Image Is Worth 16\u00d716 Words: Transformers for Image Recognition at Scale. arXiv."},{"key":"ref_36","unstructured":"Lee, S.H., Lee, S., and Song, B.C. (2021). Vision Transformer for Small-Size Datasets. arXiv."},{"key":"ref_37","first-page":"e01059","article-title":"A Novel Approach to Explain the Black-Box Nature of Machine Learning in Compressive Strength Predictions of Concrete Using Shapley Additive Explanations (SHAP)","volume":"16","author":"Ekanayake","year":"2022","journal-title":"Case Stud. Constr. Mater."},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"168","DOI":"10.1016\/j.neucom.2020.08.011","article-title":"Explaining the Black-Box Model: A Survey of Local Interpretation Methods for Deep Neural Networks","volume":"419","author":"Liang","year":"2021","journal-title":"Neurocomputing"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Wang, H., Wang, Z., Du, M., Yang, F., Zhang, Z., Ding, S., Mardziel, P., and Hu, X. (2020, January 14\u201319). Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA.","DOI":"10.1109\/CVPRW50498.2020.00020"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"19428","DOI":"10.1038\/s41598-021-98599-0","article-title":"New Segmentation and Feature Extraction Algorithm for Classification of White Blood Cells in Peripheral Smear Images","volume":"11","author":"Tavakoli","year":"2021","journal-title":"Sci. Rep."},{"key":"ref_41","first-page":"462","article-title":"Automatic Classification of White Blood Cells Using Pre-Trained Deep Models","volume":"5","author":"Katar","year":"2022","journal-title":"Sak. Univ. J. Comput. Inf. Sci."},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"2725","DOI":"10.55730\/1300-0632.3965","article-title":"Detection and Classification of White Blood Cells with an Improved Deep Learning-Based Approach","volume":"30","year":"2022","journal-title":"Turk. J. Electr. Eng. Comput. Sci."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"104518","DOI":"10.1016\/j.bspc.2022.104518","article-title":"Deep Learning Detection Network for Peripheral Blood Leukocytes Based on Improved Detection Transformer","volume":"82","author":"Leng","year":"2023","journal-title":"Biomed. Signal Process. Control"}],"container-title":["Diagnostics"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2075-4418\/13\/14\/2459\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T20:18:00Z","timestamp":1760127480000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2075-4418\/13\/14\/2459"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,7,24]]},"references-count":43,"journal-issue":{"issue":"14","published-online":{"date-parts":[[2023,7]]}},"alternative-id":["diagnostics13142459"],"URL":"https:\/\/doi.org\/10.3390\/diagnostics13142459","relation":{},"ISSN":["2075-4418"],"issn-type":[{"value":"2075-4418","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,7,24]]}}}