Bone Marrow Cell Recognition: Training Deep Object Detection with A New Loss Function

Dehao Huang, Jintao Cheng, Rui Fan, Zhihao Su, Qiongxiong Ma, Jie Li

Abstract

Automated recognition of bone marrow cells is a critical yet challenging task in hematology due to high morphological similarity between maturation stages and high cell density. This paper presents a specialized object detection framework based on YOLOv5, enhanced with a novel hierarchical loss function. By grouping 36 fine-grained cell stages into 14 coarse-grained families and penalizing inter-family errors more severely than intra-family ones, the model achieves a significant performance boost. Experimental results show a mean Average Precision ([email protected]) of 51.14% for fine-grained classification, outperforming standard models like Faster-RCNN and SSD, while maintaining real-time processing speeds.

What Problem Does This Paper Address?

Morphological examination of bone marrow remains the gold standard for diagnosing blood diseases such as leukemia. However, manual examination is labor-intensive and subjective. Automating this process faces three primary hurdles:

  1. Extreme Similarity: Cells within the same lineage (e.g., normoblasts) evolve through stages that look nearly identical, making fine-grained classification significantly harder than standard object detection tasks.
  2. Density: Cells in marrow smears are often tightly packed or overlapping.
  3. Class Diversity: Models must simultaneously identify over 30 distinct cell types.
Visual similarity between different maturation stages of normoblasts.

Standard detection models treat all classification errors equally. This paper argues that misidentifying a cell as a slightly different stage of the same type is a "better" mistake than misidentifying it as a completely different cell family.

Methods

The proposed algorithm utilizes the YOLOv5 architecture, chosen for its efficiency. The workflow integrates several key components to address the specific challenges of bone marrow imaging:

  • Spatial Pyramid Pooling (SPP): Captures global context to aid in identifying cells based on their surrounding environment.
  • Mosaic Data Augmentation: Combines multiple training images to improve the model's robustness to high cell density.
  • Hierarchical Loss Function: This is the core innovation. The researchers modified the standard classification loss by grouping 36 fine-grained classes into 14 coarse-grained families. They introduced hyperparameters $\alpha$ (to weight classification loss) and $\beta$ (to penalize "inter-family" errors). This hierarchical approach encourages the network to prioritize learning the distinct features of different cell lineages.
Workflow of the proposed bone marrow cell detection algorithm.

Datasets

The model was trained and validated on a custom dataset from the Southern Hospital of Southern Medical University, comprising 2,549 labeled images from 144 patients. The dataset includes 15,642 individual cells across 36 fine-grained classes. To ensure generalizability, the data was split by patient, with 117 patients used for training and 27 for testing.

Key Results

The hierarchical YOLOv5 model demonstrated superior performance compared to established benchmarks:

  • Accuracy: The model achieved 51.14% [email protected] for fine-grained classification, a substantial improvement over Faster-RCNN (34.97%) and SSD (21.18%).
  • Coarse Accuracy: For the 14 broader cell families, the mAP reached 69.71%.
  • Ablation Study: The custom loss function alone provided a 1.46% boost in fine-grained mAP and a 3.57% boost in coarse-grained mAP compared to standard weighted loss.
  • Efficiency: With OpenVINO optimization, the model processes an image in 73ms on a standard CPU, supporting potential real-time clinical deployment.

Limitations and Future Work

While the hierarchical loss function significantly improves performance, a 51.14% mAP indicates that further refinement is needed for clinical-grade precision. Future efforts will focus on expanding the dataset to include more examples of rare cell types and further optimizing the model architecture for deployment on diverse medical hardware.

Summary updated

BibTeX
@inproceedings{huang2021bone,
  author = {Dehao Huang and Jintao Cheng and Rui Fan and Zhihao Su and Qiongxiong Ma and Jie Li},
  title = {{Bone Marrow Cell Recognition: Training Deep Object Detection with A New Loss Function}},
  booktitle = {IST},
  year = {2021},
  url = {https://openreview.net/forum?id=lF5mMXSTd9},
}
Figure