Abstract
Accurate quantification of functional units in renal pathology is critical for evaluating disease progression. However, existing automated tools often produce binary semantic masks that fail to distinguish individual adherent structures. We present DyMorph-B2I, a dynamic, morphology-guided pipeline designed to convert these binary masks into precise instance-level segmentations. By integrating classical image processing with adaptive geometric refinement and automated hyperparameter tuning, DyMorph-B2I successfully separates complex structures like tubules and glomeruli with near-human accuracy, achieving a Mean Absolute Percentage Error (MAPE) of 0.0016.
Introduction
In computational pathology, researchers require granular data—such as glomerular counts or tubule morphology—to assess kidney health. A significant bottleneck exists because kidney tissue is exceptionally dense and heterogeneous. Most automated segmentation datasets provide only binary (semantic) masks, where all pixels of a specific class are grouped together.
Traditional post-processing methods, such as standard watershed algorithms or simple morphological erosion, frequently fail in this context. They typically result in "under-segmentation" (merged objects) or "over-segmentation" (fragmented structures). These limitations prevent accurate object counting and shape analysis, necessitating a more sophisticated, morphology-aware approach.
Methodology: The DyMorph-B2I Pipeline
DyMorph-B2I is a unified framework that dynamically optimizes a combination of algorithms based on specific tissue morphology. The pipeline operates in three distinct stages:
- Integration of Classical Methods: The system generates initial instance candidates by running watershed, skeletonization, and mathematical morphology in parallel.
- Geometric-Guided Refinement: This stage utilizes convexity defects—the "dents" in a shape's boundary—to identify potential contact points between objects. It then employs the object's skeleton (medial axis) to ensure that proposed separation lines are anatomically and geometrically plausible.
- Dynamic Hyperparameter Tuning: Recognizing that different functional units (e.g., small capillaries vs. large tubules) require different processing parameters, the pipeline utilizes a grid search to find optimal settings for kernel size and thresholding for each specific class.
Experimental Setup and Datasets
The study utilized a dataset curated from the NEPTUNE project, comprising 300 high-resolution images (3000 × 3000 pixels) of renal tissue. The dataset includes four staining modalities (H&E, PAS, Silver, and Trichrome) and focuses on six critical functional units: distal tubules (DT), proximal tubules (PT), glomerular capsules (CAP), glomerular tufts (TUFT), arteries (ART), and peritubular capillaries (PTC).
Results and Discussion
DyMorph-B2I significantly outperformed baseline methods across all quantitative and qualitative metrics.
Quantitative Performance
In terms of Mean Absolute Percentage Error (MAPE), DyMorph-B2I achieved an overall average error of 0.0016, a substantial improvement over Watershed (0.1292) and FindContour (0.1207). Furthermore, the method demonstrated near-perfect Spearman and Pearson correlation coefficients (~0.99) when compared to human expert annotations, indicating its reliability for automated counting tasks.
Qualitative Superiority
Qualitative analysis confirms that DyMorph-B2I produces clean, distinct boundaries even in crowded regions. While traditional methods often produce overlapping or fragmented results in dense tissue areas, our approach maintains structural integrity across both "Easy" classes (regular shapes like capsules) and "Hard" classes (irregular or small shapes like proximal tubules and peritubular capillaries).
Conclusion
DyMorph-B2I demonstrates that morphology-awareness and dynamic tuning are essential for accurate instance segmentation in renal pathology. By leveraging geometric context, the model distinguishes between natural anatomical curves and artificial junctions between touching structures.
Future work will address current limitations, such as extreme pathological adhesion where boundaries are completely obliterated, and the computational overhead associated with dynamic tuning. Integrating deep learning-based refinement may further enhance efficiency and performance in the most challenging cases of tissue overlapping.
Summary updated