Application of StarDist to Diagnostic-Grade White Blood Cells Segmentation in Whole Slide Images
Abstract
1. Introduction
- Application of StarDist to high-resolution WSIs in hematology, tackling real-world challenges like cell crowding, stain variation, and annotation inconsistencies;
- Systematic benchmarking against U-Net and Mask R-CNN under identical clinical conditions and metrics;
- Threshold aware robustness analysis, showing how segmentation confidence affects performance;
- Expert curated dataset using QuPath with clinical grade annotations and stain normalization via Reinhard’s method;
- Engineering rigor in training strategy, optimized learning pipeline, and model validation with advanced metrics;
- Scalable diagnostic vision, linking StarDist with YOLOv12 and SAM2 for real-time, lightweight, and interpretable medical AI.
2. Literature Review
3. Materials and Methods
3.1. Dataset Description
3.1.1. Multi-Center and Public Benchmark Datasets
3.1.2. Dicle Dataset
3.1.3. Public Benchmark Raabin-WBC (Multi-Center)
3.2. Preprocessing
3.3. Segmentation Architectures
- U-Net Architecture
- Mask R-CNN
- Application of StarDist (Evaluated Model)
3.4. Evaluation Metrics
- Accuracy (ACC): The ratio of correctly classified pixels (both foreground and background) to the total number of pixels:
- Dice Coefficient (F1-Score): A measure of spatial overlap between the predicted segmentation (P) and ground truth (G), calculated as:
- Intersection over Union (IoU): Also known as the Jaccard Index, it quantifies the overlap between prediction and ground truth masks:
- Precision: Indicates the model’s ability to correctly identify true positives among all positive predictions:
- Recall (Sensitivity): Measures how many of the actual positive cases were correctly identified:
- Panoptic Quality (PQ): An advanced metric used to assess instance segmentation quality. PQ combines recognition and segmentation into a single score:
- TP = True Positives
- FP = False Positives
- FN = False Negatives
- TN = True Negatives
4. Results
4.1. Quantitative: Evaluation
4.1.1. Quantitative Comparison of U-Net, Mask R-CNN and StarDist
4.1.2. Broader Method Comparison
4.1.3. Public Benchmark Results (Raabin-WBC)
4.2. Threshold Variation Analysis
4.3. Qualitative Analysis
4.4. Failure-Mode Analysis
5. Discussion
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Abousamra, S.; Lee, S.; Mobadersany, P. Deep learning for digital pathology image analysis: A comprehensive review. J. Pathol. Inform. 2021, 12, 29. [Google Scholar]
- Falk, T.; Mai, D.; Bensch, R.; Çiçek, Ö.; Abdulkadir, A.; Marrakchi, Y.; Böhm, A.; Deubner, J.; Jäckel, Z.; Seiwald, K.; et al. Author Correction: U-Net: Deep learning for cell counting, detection, and morphometry. Nat. Methods 2019, 16, 351. [Google Scholar] [CrossRef] [PubMed]
- Isensee, F.; Jaeger, P.F.; Kohl, S.A.A.; Petersen, J.; Maier-Hein, K.H. nnU-Net: A self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods 2021, 18, 203–211. [Google Scholar] [CrossRef] [PubMed]
- Chen, L.-C.; Papandreou, G.; Kokkinos, I.; Murphy, K.; Yuille, A.L. DeepLab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. IEEE Trans. Pattern Anal. Mach. Intell. 2018, 40, 834–848. [Google Scholar] [CrossRef] [PubMed]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Proceedings of the Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015, Munich, Germany, 5–9 October 2015; Lecture Notes in Computer Science. Volume 9351, pp. 234–241. [Google Scholar]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar]
- Schmidt, U.; Weigert, M.; Broaddus, C.; Myers, G. Cell detection with star-convex polygons. In Proceedings of the Medical Image Computing and Computer Assisted Intervention—MICCAI 2018, Granada, Spain, 16–20 September 2018. [Google Scholar] [CrossRef]
- Weigert, M.; Schmidt, U.; Haase, R.; Sugawara, K.; Myers, G. Star-convex polyhedra for 3D object detection and segmentation in microscopy. In Proceedings of the 2020 IEEE Winter Conference on Applications of Computer Vision (WACV), Snowmass Village, CO, USA, 1–5 March 2020; Lecture Notes in Computer Science. Volume 12351, pp. 3655–3662. [Google Scholar] [CrossRef]
- Liu, Y.; Wang, C.; Lu, M.; Yang, J.; Gui, J.; Zhang, S. From simple to complex scenes: Learning robust feature representations for accurate human parsing. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 5449–5462. [Google Scholar] [CrossRef] [PubMed]
- Hollandi, R.; Szkalisity, A.; Toth, T.; Tasnadi, E.; Molnar, C.; Mathe, B.; Grexa, I.; Molnar, J.; Balind, A.; Gorbe, M.; et al. nucleAIzer: A Parameter-free Deep Learning Framework for Nucleus Segmentation using Image Style Transfer. Cell Syst. 2020, 10, 453–458.e6. [Google Scholar] [CrossRef] [PubMed]
- Stringer, C.; Wang, T.; Michaelos, M.; Pachitariu, M. Cellpose: A Generalist Algorithm for Cellular Segmentation. Nat. Methods 2021, 18, 100–106. [Google Scholar] [CrossRef] [PubMed]
- Reinhard, E.; Adhikhmin, M.; Gooch, B.; Shirley, P. Color transfer between images. IEEE Comput. Graph. Appl. 2001, 21, 34–41. [Google Scholar] [CrossRef]
- Wang, G.; Yang, L.; Cao, D.; Xu, X. A comprehensive review of nuclei segmentation in digital pathology images. Artif. Intell. Med. 2022, 125, 102173. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 5998–6008. [Google Scholar]
- Kirillov, A.; Mintun, E.; Ravi, N.; Mao, H.; Rolland, C.; Gustafson, L.; Xiao, T.; Whitehead, S.; Berg, A.C.; Lo, W.-Y.; et al. Segment Anything. arXiv 2023, arXiv:2304.02643. [Google Scholar] [PubMed]
- Macenko, M.; Niethammer, M.; Marron, J.S.; Borland, D.; Woosley, J.T.; Guan, X.; Schmitt, C.; Thomas, N.E. A method for normalizing histology slides for quantitative analysis. In Proceedings of the 2009 IEEE International Symposium on Biomedical Imaging: From Nano to Macro, Boston, MA, USA, 28 June–1 July 2009; pp. 1107–1110. [Google Scholar]
- Zhang, Y.; Liu, X.; Chen, F. StarDist-based multi-class WBC segmentation in peripheral blood smears using transformer enhancement. Comput. Biol. Med. 2023, 158, 106743. [Google Scholar]
- Lin, T.-Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
- Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2881–2890. [Google Scholar]
- Patel, D.; Rana, A.; Kumar, R. Generalized WBC segmentation in hematology slides via domain adaptation and stain-invariant deep learning. J. Pathol. Inform. 2024, 15, 21. [Google Scholar]
- Zhang, Y.; Liu, X.; Chen, F. Light-Field Image Multiple Reversible Robust Watermarking Against Geometric Attacks. IEEE Trans. Inf. Forensics Secur. 2019, 14, 1021–1034. [Google Scholar]
- Janowczyk, A.; Madabhushi, A. Deep learning for digital pathology image analysis: A comprehensive tutorial with selected use cases. J. Pathol. Inform. 2016, 7, 29. [Google Scholar] [CrossRef] [PubMed]
- Kouzehkanan, Z.M.; Saghari, S.; Tavakoli, E.; Rostami, P.; Abbaszadeh, M.; Saltsar, E.S.; Mirzadeh, F.; Gheidishahran, M.; Gorgi, F.; Mohammadi, S.; et al. A Large Dataset of White Blood Cells Containing Cell Locations and Types, along with Segmented Nuclei and Cytoplasm. Sci. Rep. 2022, 12, 1123. [Google Scholar] [CrossRef] [PubMed]
- Kouzehkanan, Z.M.; Saghari, S.; Tavakoli, E.; Rostami, P.; Abaszadeh, M.; Satlsar, E.S.; Mirzadeh, F.; Gheidishahran, M.; Gorgi, F.; Mohammadi, S.; et al. Raabin-WBC: A Large Free Access Dataset of White Blood Cells from Normal Peripheral Blood. bioRxiv 2021. [Google Scholar] [CrossRef]
- Sankaranarayanan, A.; Khachaturov, G.; Smythe, K.S.; Mittal, S. Quantitative Benchmarking of Nuclear Segmentation Algorithms in Multiplexed Immunofluorescence Imaging for Translational Studies. Commun. Biol. 2025, 8, 836. [Google Scholar] [CrossRef] [PubMed]
Failure Type | Frequency (%) | Most Affected Cell Type |
---|---|---|
Over-segmentation | 22.5 | Lymphocytes |
Under-segmentation | 15.3 | Blast Cells |
Missed Cells | 8.1 | Neutrophils |
Merged Instances | 10.6 | Neutrophils |
Model | Dice | IoU | Precision |
---|---|---|---|
U-Net | 0.976 ± 0.012 | 0.957 ± 0.015 | 0.997 ± 0.005 |
Mask R-CNN | 0.942 ± 0.018 | 0.901 ± 0.022 | 0.987 ± 0.007 |
StarDist | 0.983 ± 0.009 | 0.953 ± 0.011 | 0.993 ± 0.004 |
StarDist on MoNuSeg | 0.952 ± 0.014 | 0.919 ± 0.016 | 0.981 ± 0.006 |
Model | Accuracy | Dice | IoU | Precision | Recall | F1-Score |
---|---|---|---|---|---|---|
U-Net | 0.953 | 0.976 | 0.957 | 0.997 | 0.963 | 0.976 |
Mask R-CNN | 0.920 | 0.942 | 0.901 | 0.987 | 0.908 | 0.942 |
StarDist | 0.965 | 0.983 | 0.953 | 0.993 | 0.972 | 0.983 |
Study (Year) | Dataset/Domain | Metric Reported by Paper | Representative Value(s) | Notes |
---|---|---|---|---|
[7] | Mixed EM/histology (incl. DSB2018) | Average Precision (AP) at various IoU thresholds (object-level) | Dataset-specific AP across IoU thresholds; see paper tables/plots. | Original StarDist-2D; uses object-level metrics, not pixel Dice. |
[8] | 3D fluorescence microscopy (WORM, PARHY, TRIF, A549-SIM) | Object matching accuracy at fixed IoU thresholds | Example@IoU = 0.50: WORM 0.765; PARHY 0.593 (see Table 1 for others). | StarDist-3D vs. 3D U-Net; object-wise accuracy rather than pixel Dice. |
[10] | Nuclei datasets (e.g., DSB2018); nucleAIzer framework | DSB score/AP/F1-style leaderboard and per-dataset benchmarks | Leaderboard metrics (not single per-image Dice/IoU values). | Style-transfer + U-Net baseline commonly compared with StarDist (not StarDist). |
[11] | Broad microscopy; Cellpose benchmark | F1/AP-style object metrics on multiple datasets | Dataset-specific F1/AP vs. IoU (see main text and supplement). | Includes StarDist baseline comparison; no single Dice reported for StarDist. |
[25] | Multiplexed immunofluorescence (IF) tissue panels | F1@IoU 0.5 and F1-AUC per tissue | Tool rankings vary by tissue; no pooled Dice/IoU. | Benchmarks several tools incl. StarDist; Mesmer often top on some tissues. |
This work (StarDist on hematological WSIs) | Hematological whole-slide images (WSIs) | Report metric used (e.g., F1@IoU 0.5, mAP@[0.5:0.95]; optional pixel Dice) | Dice Coefficient of 0.983 and IoU value of 0.953. | Highest performance on large-scale expert-labeled WBC images. |
Threshold τ | U-Net | Mask R-CNN | StarDist |
---|---|---|---|
0.50 | 0.9994 | 0.9104 | 0.9998 |
0.70 | 0.9641 | 0.8729 | 0.9994 |
0.85 | 0.2939 | 0.6075 | 0.4630 |
Method | Over-Segmentation Error (%) | Fragmentation Error (%) | Missing-Boundary Error (%) |
---|---|---|---|
StarDist (baseline) | 14.8 | 11.3 | 9.7 |
SAM2 iterative refinement | 14.8 | 11.3 | 2.7 |
Self-attention module | 6.8 | 11.3 | 9.7 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bamwenda, J.; Özerdem, M.S.; Ayyildiz, O.; Akpolat, V. Application of StarDist to Diagnostic-Grade White Blood Cells Segmentation in Whole Slide Images. Electronics 2025, 14, 3538. https://doi.org/10.3390/electronics14173538
Bamwenda J, Özerdem MS, Ayyildiz O, Akpolat V. Application of StarDist to Diagnostic-Grade White Blood Cells Segmentation in Whole Slide Images. Electronics. 2025; 14(17):3538. https://doi.org/10.3390/electronics14173538
Chicago/Turabian StyleBamwenda, Julius, Mehmet Siraç Özerdem, Orhan Ayyildiz, and Veysi Akpolat. 2025. "Application of StarDist to Diagnostic-Grade White Blood Cells Segmentation in Whole Slide Images" Electronics 14, no. 17: 3538. https://doi.org/10.3390/electronics14173538
APA StyleBamwenda, J., Özerdem, M. S., Ayyildiz, O., & Akpolat, V. (2025). Application of StarDist to Diagnostic-Grade White Blood Cells Segmentation in Whole Slide Images. Electronics, 14(17), 3538. https://doi.org/10.3390/electronics14173538