PTC Segmentation

About
Summary
This algorithm is trained on 59 PAS-stained Whole Slide Images (WSIs) of kidney transplant biopsies to be able to segment peritubular capillaries (PTCs) from the rest of the tissue. We had access to a total of 69 WSI's from 64 different patients. The underlying architecture is based on nnU-Net V2 for Pathology, a self-configuring deep learning framework optimized for biomedical image segmentation. By distinguishing PTCs from surrounding tissue structures, this tool can support quantitative morphometric analyses, facilitate large-scale research studies, and potentially aid in diagnostic workflows.
Mechanism
Target Population¶
This algorithm is intended for renal pathologists evaluating kidney transplant biopsies. It supports the assessment of Banff lesion scores, with a particular focus on assisting in the identification and grading of peritubular capillaritis.
Algorithm Description¶
The algorithm is based on nnU-Net V2 for pathology, trained to segment peritubular capillaries (PTCs) and support PTC scoring. A dataset of 69 PAS-stained whole-slide images (WSIs) was used. Preprocessing included filtering annotations to retain only confident and visible PTCs.
The model was trained with 5-fold cross-validation using a balanced sampler with classes: background and PTC. Training was performed with a patch size of 512, a spacing of 0.5, and 200 epochs. During inference, sliding-window predictions were generated with Gaussian weighting to reduce patch-edge artifacts. Predictions across folds were averaged at the softmax level, and uncertainty was estimated from the variance across folds, allowing pathologists to assess model reliability.
Inputs and Outputs¶
Inputs: PAS-stained kidney transplant biopsy WSIs and tissue masks (TIF format).
Outputs: Segmentation masks of PTC regions relevant for Banff lesion scoring (TIF format). Optionally, uncertainty maps are generated to indicate regions where model predictions may be less reliable, highlighting areas for closer review.
Interfaces
This algorithm implements all of the following input-output combinations:
Validation and Performance
The algorithm was evaluated on a test set of 20 PAS-stained kidney transplant biopsy whole slide images. For the binary task of peritubular capillary (PTC) versus other tissue segmentation, the model achieved a mean Dice coefficient of 0.751 (range: 0.600–0.845) and a mean Jaccard Index of 0.607 (range: 0.432–0.732). Precision and recall values varied across slides, with high-performing cases showing precision and recall above 0.86, and lower-performing cases generally associated with reduced PTC recognizability. Performance differences were partly related to tissue characteristics, such as the density of PTCs and the degree of interstitial fibrosis and tubular atrophy (IFTA).
Slide ID | Precision | Recall | Dice | Jaccard | Recognizability |
---|---|---|---|---|---|
1 | 0.867 | 0.853 | 0.802 | 0.670 | Good |
2 | 0.814 | 0.778 | 0.780 | 0.612 | Good |
3 | 0.884 | 0.896 | 0.845 | 0.732 | Good |
5 | 0.905 | 0.841 | 0.836 | 0.710 | Good |
8 | 0.783 | 0.819 | 0.780 | 0.640 | Good |
9 | 0.816 | 0.742 | 0.724 | 0.567 | Good |
20* | 0.661 | 0.559 | 0.616 | 0.445 | Good |
11 | 0.875 | 0.720 | 0.751 | 0.602 | Moderate to good |
6 | 0.821 | 0.787 | 0.823 | 0.701 | Moderate |
7 | 0.768 | 0.708 | 0.672 | 0.510 | Moderate |
13 | 0.812 | 0.665 | 0.705 | 0.688 | Moderate |
14 | 0.791 | 0.731 | 0.757 | 0.609 | Moderate |
16 | 0.745 | 0.700 | 0.722 | 0.628 | Moderate |
10 | 0.812 | 0.740 | 0.739 | 0.603 | Moderate to hard |
18 | 0.760 | 0.787 | 0.778 | 0.664 | Moderate to hard |
4 | 0.726 | 0.902 | 0.701 | 0.540 | Hard |
12 | 0.701 | 0.612 | 0.650 | 0.485 | Hard |
15 | 0.610 | 0.773 | 0.645 | 0.476 | Hard |
17 | 0.685 | 0.655 | 0.600 | 0.432 | Hard |
19 | 0.673 | 0.684 | 0.611 | 0.440 | Hard |
*Lots of atrophic tubuli (PTC mimickers)
Uses and Directions
This algorithm was developed for research purposes only.