Abstract
<jats:p><p>Specular highlights, mucosal folds, and scale changes in endoscopic frames make polyp boundaries visually unstable, so a segmentation model must capture small lesions while avoiding mask leakage beyond the lesion area. <strong>The objective</strong> was to improve binary polyp segmentation by introducing an additional geometric cue that encodes pixel proximity to the object boundary, while keeping post-processing simple and reproducible. <strong>The hypothesis</strong> stated that adding a boundary distance map (denoted as &phi;, &laquo;phi&raquo;) and incorporating it into the loss design would increase sensitivity to small polyps and raise recall without destabilizing performance on medium and large lesions. The study compared two variants of the same backbone: a U-shaped convolutional network (U-Net) with a residual network (ResNet-34) as the encoder, trained under comparable optimization settings with early stopping. <strong>Materials and methods</strong> involved training a baseline model and a corrected &phi;-fixed model where &phi; was computed consistently with the ground-truth masks; test evaluation used the S&oslash;rensen&ndash;Dice coefficient and the Jaccard index to quantify overlap between predicted and reference masks, along with recall, precision, and pixel-wise false positive/false negative fractions. The binarization threshold was selected on the validation split, post-processing retained the largest connected component, and confidence intervals for metric differences were estimated via sequence-level bootstrap. <strong>Results</strong> demonstrated a consistent improvement for &phi;-fixed (validation-optimal threshold 0.2) over the baseline (threshold 0.8) on the test set: Dice increased from 0.6642 to 0.7002, Jaccard from 0.5905 to 0.6295, and recall from 0.6154 to 0.7723. The bootstrap estimate of the difference (&phi;-fixed minus baseline) yielded +0.0361 for Dice with a 95% interval of [+0.0113, +0.0640] and +0.2150 for recall with [+0.0899, +0.3962], while precision decreased by &minus;0.1537 with [&minus;0.2541, &minus;0.0663], reflecting a shift toward fewer misses at the cost of more extra detections. <strong>Conclusions</strong> indicate that the &phi; cue provides a practical gain in a recall-oriented operating regime: &phi;-fixed improves mask overlap and substantially raises recall, with a controlled increase in false positives. Validation-driven threshold selection remains essential because &phi;-fixed changes the error trade-off and benefits from a lower binarization threshold to realize the recall advantage.</p></jats:p>