CAPE: Connectivity-Aware Path Enforcement Loss for Curvilinear Structure Delineation
Elyar Esmaeilzadeh, Ehsan Garaaghaji, Farzad Hallaji Azad, Doruk Oner
TL;DR
The paper tackles the problem that pixel-wise segmentation losses fail to enforce connectivity in curvilinear structures. It introduces CAPE, a differentiable graph-based loss that uses ground-truth graphs and shortest-path comparisons by projecting ground-truth paths onto a predicted distance map and computing path costs via $L_{\textsc{CAPE}}$. By combining with $L_{\text{MSE}}$ as $L_{\text{total}} = L_{\text{MSE}} + \alpha L_{\textsc{CAPE}}$, CAPE delivers denser connectivity gradients and improves topology metrics such as APLS and TLTS on 2D CREMI, DRIVE, and 3D Brain datasets, while maintaining competitive pixel-wise accuracy. These results suggest CAPE enables more reliable curvilinear structure delineation with potential future work toward graph-domain predictions.
Abstract
Promoting the connectivity of curvilinear structures, such as neuronal processes in biomedical scans and blood vessels in CT images, remains a key challenge in semantic segmentation. Traditional pixel-wise loss functions, including cross-entropy and Dice losses, often fail to capture high-level topological connectivity, resulting in topological mistakes in graphs obtained from prediction maps. In this paper, we propose CAPE (Connectivity-Aware Path Enforcement), a novel loss function designed to enforce connectivity in graphs obtained from segmentation maps by optimizing a graph connectivity metric. CAPE uses the graph representation of the ground truth to select node pairs and determine their corresponding paths within the predicted segmentation through a shortest-path algorithm. Using this, we penalize both disconnections and false positive connections, effectively promoting the model to preserve topological correctness. Experiments on 2D and 3D datasets, including neuron and blood vessel tracing demonstrate that CAPE significantly improves topology-aware metrics and outperforms state-of-the-art methods.
