WSI-Babel-Shark: A modular pipeline for robust metadata extraction from heterogeneous whole slide image labels in digital pathology
4 affiliations
- 1Section Computational Pathology Heidelberg, Institute of Pathology Heidelberg, University Hospital Heidelberg, University of Heidelberg, Heidelberg, Germany; Corresponding author.
- 2Section Computational Pathology Heidelberg, Institute of Pathology Heidelberg, University Hospital Heidelberg, University of Heidelberg, Heidelberg, Germany
- 3Section Computational Pathology Heidelberg, Institute of Pathology Heidelberg, University Hospital Heidelberg, University of Heidelberg, Heidelberg, Germany; Data Analysis and Modeling in Medicine, Mannheim Institute for Intelligent Systems in Medicine (MIISM), Heidelberg University, Mannheim, Germany
- 4Section Computational Pathology Heidelberg, Institute of Pathology Heidelberg, University Hospital Heidelberg, University of Heidelberg, Heidelberg, Germany; Interdisciplinary Center for Scientific Computing (IWR), Heidelberg University, Heidelberg, Germany
Abstract
Introduction: Automated extraction of slide metadata remains a major bottleneck in digital pathology, especially in settings where barcode identifiers are missing, damaged, or inconsistent. Manual transcription of case, block, and stain information is error-prone and does not scale. Building on our previous whole-slide image (WSI)-Babel-Fish framework, we developed WSI-Babel-Shark, a more extensible pipeline for reliable metadata extraction across heterogeneous slide-label layouts. Materials and methods: WSI-Babel-Shark integrates data matrix code decoding, region of interest (ROI)-based optical character recognition (OCR), and rule-based metadata parsing within a modular Python and Docker architecture. To handle diverse institutional label formats, the system incorporates a deep learning-based label layout classifier using a ResNet-18 backbone, fused with handcrafted descriptors and prototype-based open-set recognition to categorize labels into 10 predefined layout groups. A graphical interface supports ROI annotation, dataset management, and configuration editing. Performance was evaluated on 270 WSIs (.svs and .ndpi formats) and cross-validated using 110 slides from the previously published WSI-Babel-Fish dataset to assess backward compatibility. Results: The label layout classifier achieved an overall accuracy of 97.4%, with macro-averaged precision, recall, and F1-score of 0.98 while reliably rejecting previously unseen layouts. End-to-end pipeline evaluation achieved complete SlideID reconstruction for 258 of 267 evaluable WSIs (96.6%). Independent comparison of OCR-derived metadata with the corresponding Data Matrix-decoded metadata on 236 slides demonstrated complete metadata concordance for 230 slides (97.5%), whereas field-level concordance ranged from 98.3% to 100.0% across all evaluated metadata fields. Cross-dataset analysis confirmed full compatibility with WSI-Babel-Fish label structures. Conclusion: WSI-Babel-Shark advances automated metadata extraction from WSIs by introducing a label-layout classification framework validated on heterogeneous label layouts and incorporating open-set recognition, together with standardized ROI annotation and a fully containerized implementation. The framework ensures reproducible linkage between digitized slides and lab information, is designed to facilitate interoperability with lab information systems, and provides a scalable foundation for large-scale digital pathology workflows. The complete implementation is openly available at: https://github.com/cpheidelberg/WSI-Babel-Shark .
Related
- Transantral Extraction of an Ectopic Third Molar Due to Suspected Pathology
- Extraction of clinical information from faxed medical records using a small local large language model pipeline on consumer hardware
- Deploying YOLO for whole-slide mitosis detection: A transparent, auditable, and reproducible pipeline for pathology AI-assisted diagnosis and decision-support tool
- Enhancing medical image segmentation with HCE-Net: A heterogeneous feature collaborative extraction network
- ContextMRI: Enhancing compressed sensing MRI through metadata conditioning
BibTeX
@article{aliyari2026wsibabelshark,
title = {{WSI-Babel-Shark: A modular pipeline for robust metadata extraction from heterogeneous whole slide image labels in digital pathology}},
author = {Shahram Aliyari and Maximilian Legnar and Christoph Blattgerste and Ayk Jessen and Balamurugan Thirukonda Subramanian Balakrishnan and Nils Englert and Philip S.J. Kaib and Mark Sementsov and Constantin Schwab and Cleo-Aron Weis},
journal = {Journal of Pathology Informatics},
year = {2026},
month = sep,
doi = {10.1016/j.jpi.2026.100722},
url = {https://doi.org/10.1016/j.jpi.2026.100722},
note = {CC BY},
}
RIS
TY - JOUR
TI - WSI-Babel-Shark: A modular pipeline for robust metadata extraction from heterogeneous whole slide image labels in digital pathology
AU - Shahram Aliyari
AU - Maximilian Legnar
AU - Christoph Blattgerste
AU - Ayk Jessen
AU - Balamurugan Thirukonda Subramanian Balakrishnan
AU - Nils Englert
AU - Philip S.J. Kaib
AU - Mark Sementsov
AU - Constantin Schwab
AU - Cleo-Aron Weis
PY - 2026
DA - 2026/09/24
JO - Journal of Pathology Informatics
DO - 10.1016/j.jpi.2026.100722
UR - https://doi.org/10.1016/j.jpi.2026.100722
AB - Introduction: Automated extraction of slide metadata remains a major bottleneck in digital pathology, especially in settings where barcode identifiers are missing, damaged, or inconsistent. Manual transcription of case, block, and stain information is error-prone and does not scale. Building on our previous whole-slide image (WSI)-Babel-Fish framework, we developed WSI-Babel-Shark, a more extensible pipeline for reliable metadata extraction across heterogeneous slide-label layouts. Materials and methods: WSI-Babel-Shark integrates data matrix code decoding, region of interest (ROI)-based optical character recognition (OCR), and rule-based metadata parsing within a modular Python and Docker architecture. To handle diverse institutional label formats, the system incorporates a deep learning-based label layout classifier using a ResNet-18 backbone, fused with handcrafted descriptors and prototype-based open-set recognition to categorize labels into 10 predefined layout groups. A graphical interface supports ROI annotation, dataset management, and configuration editing. Performance was evaluated on 270 WSIs (.svs and .ndpi formats) and cross-validated using 110 slides from the previously published WSI-Babel-Fish dataset to assess backward compatibility. Results: The label layout classifier achieved an overall accuracy of 97.4%, with macro-averaged precision, recall, and F1-score of 0.98 while reliably rejecting previously unseen layouts. End-to-end pipeline evaluation achieved complete SlideID reconstruction for 258 of 267 evaluable WSIs (96.6%). Independent comparison of OCR-derived metadata with the corresponding Data Matrix-decoded metadata on 236 slides demonstrated complete metadata concordance for 230 slides (97.5%), whereas field-level concordance ranged from 98.3% to 100.0% across all evaluated metadata fields. Cross-dataset analysis confirmed full compatibility with WSI-Babel-Fish label structures. Conclusion: WSI-Babel-Shark advances automated metadata extraction from WSIs by introducing a label-layout classification framework validated on heterogeneous label layouts and incorporating open-set recognition, together with standardized ROI annotation and a fully containerized implementation. The framework ensures reproducible linkage between digitized slides and lab information, is designed to facilitate interoperability with lab information systems, and provides a scalable foundation for large-scale digital pathology workflows. The complete implementation is openly available at: https://github.com/cpheidelberg/WSI-Babel-Shark .
SN - 2153-3539
SN - 2229-5089
ER -