YOLO — bone marrow cell classification (20 cell types)

Twenty-class classifier for single-cell images from bone marrow smears, built with Ultralytics YOLO (classification).

79.48 % balanced accuracy over 20 cell types — 8 points above the dataset paper's ResNeXt-50 (71.4 %), trained on 30 % of the images with one fixed recipe, without dataset-specific tuning.

Leaderboard

Metric on the held-out test set (17,137 cells) Value
Balanced accuracy (mean recall, 20 classes) 79.48 %
Accuracy 85.30 %
Macro F1 76.65 %

The companion model (SigLIP) and the full write-up: GitHub.


The dataset

Bone-Marrow-Cytomorphology_MLL_Helmholtz_Fraunhofer (Matek et al. 2021): 250 × 250 px single-cell images from bone marrow smears of 945 patients, May-Grünwald-Giemsa stained, expert-labelled into 21 classes. Abnormal eosinophils (8 images) were dropped, leaving 20 classes.

Class samples

Split Cells
Train (max 4,000 per class) 51,737
Validation 17,137
Test 17,137

The problems with this dataset

  1. Extreme imbalance — from 29,424 images (segmented neutrophils) down to 8; seven classes have fewer than 500 images, and three have only 4 to 6 cells in the test split.
  2. No patient identifiers — every split, ours and the paper's, is per image, so the same patient's cells can appear in training and test.
  3. Neighbouring maturation stages — myelocyte → metamyelocyte → band → segmented neutrophil are judgement calls at the boundaries, and that is where the errors concentrate.

Class imbalance


Compared with the dataset paper

Matek et al. (Blood 2021) report class-wise strict recall for a ResNeXt-50 trained with five-fold cross-validation on the whole dataset (classes upsampled to about 25,000 images). The mean over the same 20 classes is 71.4 %. This model is above the paper on 17 of the 20 classes; the three below it are small in the test set — basophils (44 cells), other cells (30) and immature lymphocytes (6).

Per class vs paper

Not the same protocol: the paper averages five folds; this model is tested once on a 10 % hold-out. Both are per-image random splits over the same 20 classes.


Results in detail

Confusion matrix

(Matrix shown for SigLIP; the YOLO errors follow the same maturation-chain pattern.)


Training and evaluation

Training data at most 4,000 cells per class (51,737 of 171,366)
Training 50 epochs, 224 px, batch 64, Ultralytics default augmentation
Split stratified 80 / 10 / 10 per image, seed 42
Model selection best epoch on the validation split
Test held-out 10 %, evaluated once, no tuning on the test set
Hardware one NVIDIA T4

Usage

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

model = YOLO(hf_hub_download("ghostsas001/bone-marrow-cells-yolo", "yolo.pt"))
result = model.predict("cell.jpg", imgsz=224)[0]
print(model.names[int(result.probs.top1)])

Labels: ART, BAS, BLA, EBO, EOS, FGC, HAC, KSC, LYI, LYT, MMZ, MON, MYB, NGB, NGS, NIF, OTH, PEB, PLM, PMO — abbreviations as in the dataset (for example BLA = blast, MYB = myelocyte, NGS = segmented neutrophil).

Limitations

Research model, not a medical device. Trained on one laboratory's smears and scanner; other stains, microscopes or cohorts may reduce accuracy. One training run, no confidence intervals. Classes with fewer than 50 test cells have noisy recall.

References

  • Matek C., Krappe S., Münzenmayer C., Haferlach T., Marr C. Highly accurate differentiation of bone marrow cell morphologies using deep neural networks on a large image data set. Blood 138(20), 2021. doi:10.1182/blood.2020010568
  • Dataset: Bone-Marrow-Cytomorphology_MLL_Helmholtz_Fraunhofer, The Cancer Imaging Archive, doi:10.7937/TCIA.AXH3-T579, CC BY 4.0
  • Ultralytics YOLO — docs.ultralytics.com

Licence

Built with Ultralytics YOLO, which is licensed under AGPL-3.0; these weights are distributed under the same licence. Training images: CC BY 4.0 (Matek et al., TCIA).

Downloads last month
48
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support