Attention-guided fusion of swin transformer and DINOv2 features for peripheral blood cell classification across eight classes
摘要
Accurate classification of peripheral blood cell types from microscopy images can support automated hematology workflows by reducing manual review burden and improving consistency. However, fine-grained recognition remains challenging due to strong inter-class similarity, intra-class morphological variability, and confounding cytoplasmic texture patterns that blur decision boundaries among related cell types. We propose SwinDiNO-AFNet for eight-class classification of basophil, eosinophil, erythroblast, immature granulocyte (IG), lymphocyte, monocyte, neutrophil, and platelet. SwinDiNO-AFNet is a dual-path hybrid that fuses hierarchical window-based features from a Swin Transformer with global representations from a pretrained DINOv2 vision transformer used strictly as a feature extractor. The flattened Swin and pooled DINOv2 features are concatenated and refined through a channel attention module to obtain attention-weighted fusion before the final classifier. To ensure rigorous evaluation, the training pipeline enforces leakage control via perceptual-hash based near-duplicate removal before fold creation, with consistent RGB enforcement, 224 × 224 resizing, ImageNet normalization, and train-only augmentation and robustness noise applied exclusively within training folds. Under leakage-safe stratified fivefold cross-validation, SwinDiNO-AFNet achieves 98.61 ± 0.21% validation accuracy with 98.46% macro-F1, and statistical testing (Welch with Holm adjustment) supports improvements over multiple baseline backbones under the same protocol. Precision-recall analysis further indicates near-ceiling separability (micro-AUPRC 0.9979), while confusion matrix and Grad-CAM based error analysis show that remaining failures concentrate in morphologically ambiguous cases, including IG confusions toward granulocytic patterns. Overall, the results show that attention-guided fusion of complementary Swin and DINOv2 representations, combined with leakage-safe cross-validation and XAI-backed diagnostics, provides a strong solution for eight-class peripheral blood cell classification on the studied dataset.