A Two-Stage YOLO-Swin Transformer Pipeline for Cross-Dataset White Blood Cell Classification
C.-W. Chang, K.-J. Sun, C.-H. Tsai, C.-Y. Chen
Key points
From the paper's conclusion- Conclusions: The proposed two-stage pipeline achieved strong cross-dataset WBC classification performance.
Abstract
Background: White blood cell (WBC) classification across datasets is challenged by differences in staining, image context, and class distributions. Methods: We developed a two-stage YOLO11-Swin Transformer pipeline. In the first stage, WBC detection and context-preserving cropping, a YOLO11 detector finds the leukocyte in each uncropped image and produces a cell-focused crop that retains the surrounding background. In the second stage, WBC classification, a Swin Transformer (Swin-B) assigns the crop to one of nine cell types. The classifier was trained on detector-cropped cells from five public datasets, so the first stage supplies the same kind of input at test time; morphology-preserving color augmentation addressed staining variation, and class-weighted cross-entropy addressed class imbalance. WBCBench2026, a public benchmark not used for training, served for external evaluation in seven harmonized classes, scored by macro-F1 (the mean of per-class F1). Further analyses removed the first stage or masked the background, compared classifier backbones, held out each training dataset (leave-one-dataset-out, LODO), and tested a second split (Phase-2) with about 60% synthetically degraded images. Results: The full pipeline reached an external macro-F1 of 0.879{+/-}0.006 on 8,080 benchmark images. With uncropped images as input, the same crop-trained classifier reached 0.627{+/-}0.039, and crops that kept the surrounding background outperformed background-masked crops (0.867 versus 0.760). With identical detector-cropped input, Swin-B outperformed convolutional baselines (0.863 versus 0.718-0.813), and its advantage over ResNet50 persisted across three training configurations. In LODO, macro-F1 on the held-out dataset ranged from 0.59 to 0.91, revealing source-specific variation not fully covered by the remaining datasets. On Phase-2, macro-F1 was 0.769{+/-}0.002. Two hematologists independently reviewed all 205 blast- or promyelocyte-related model-benchmark disagreements and gave the same verdict on 73 crops (35.6%): 21 model right, 43 model wrong, 9 ambiguous. Conclusions: The proposed two-stage pipeline achieved strong cross-dataset WBC classification performance. Context-preserving cropping was essential for the crop-trained classifier, and the LODO findings support representing the same classes across diverse sources when developing robust WBC classifiers.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A Hybrid ViT-ECA-CF Framework with Adaptive Loss Reweighting for Imbalanced White Blood Cell Classification.Bioengineering (Basel, Switzerland) · 2026
- Deep Learning-Based Detection Model for Leukemia Cells in Peripheral Blood Smears Using YOLOv11-Large.Current oncology (Toronto, Ont.) · 2026
- Hybrid Techniques for the Segmentation and Classification of White Blood Cancer Based on the Fusion of Deep Network FeaturesMathematical and Computational Applications · 2026
- Retrieval-Augmented Vision Foundation Models for Robust Leukemia Cell Classification across Multiple Microscopy DatasetsarXiv · 2026
- Attention guided segmentation and multi resolution transformer learning for blood cancer detectionDiscover Artificial Intelligence · 2026
- A hierarchical local-global morphology learning network for white blood cell classificationFrontiers in Bioengineering and Biotechnology · 2026