WSI-Babel-Shark: A modular pipeline for robust metadata extraction from heterogeneous whole slide image labels in digital pathology
Related Experiment Video
Updated: Nov 2, 2026

Automated Slide Scanning and Segmentation in Fluorescently-labeled Tissues Using a Widefield High-content Analysis System
Published on: May 3, 2018
Shahram Aliyari1, Maximilian Legnar1, Christoph Blattgerste1,2
1Section Computational Pathology Heidelberg, Institute of Pathology Heidelberg, University Hospital Heidelberg, University of Heidelberg, Heidelberg, Germany.
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.

