cs.CVMar 19, 2026

Towards High-Quality Image Segmentation: Improving Topology Accuracy by Penalizing Neighbor Pixels

Authors: Juan Miguel Valverde, Dim P. Papadopoulos, Rasmus Larsen, Anders Bjorholm Dahl

Organizations: Technical University of Denmark

Abstract

Standard deep learning models for image segmentation cannot guarantee topology accuracy, failing to preserve the correct number of connected components or structures. This, in turn, affects the quality of the segmentations and compromises the reliability of the subsequent quantification analyses. Previous works have proposed to enhance topology accuracy with specialized frameworks, architectures, and loss functions. However, these methods are often cumbersome to integrate into existing training pipelines, they are computationally very expensive, or they are restricted to structures with tubular morphology. We present SCNP, an efficient method that improves topology accuracy by penalizing the logits with their poorest-classified neighbor, forcing the model to improve the prediction at the pixels' neighbors before allowing it to improve the pixels themselves. We show the effectiveness of SCNP across 13 datasets, covering different structure morphologies and image modalities, and integrate it into three frameworks for semantic and instance segmentation. Additionally, we show that SCNP can be integrated into several loss functions, making them improve topology accuracy. Our code can be found at https://jmlipman.github.io/SCNP-SameClassNeighborPenalization.

Figures & tables

Appendix figures & tables20 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Disconnect to Connect: A Data Augmentation Method for Improving Topology Accuracy in Image Segmentation

    Mar 7, 2025Juan Miguel Valverde, Maja Østergaard, Adrian Rodriguez-Palomo +4Topology-Preserving Image SegmentationThin-Structure Segmentation

  2. Continuous-tone Simple Points: An ℓ0\ell_0-Norm of Cyclic Gradient for Topology-Preserving Data-Driven Image Segmentation

    Apr 30, 2026Wenxiao Li, Faqiang Wang, Yuping Duan +3Image SegmentationTopology-Preserving Image Segmentation

  3. Deep Image Segmentation via Discriminant Feature Learning

    May 14, 2026Adam Dawid Sztamborski, Raül Pérez-Gonzalo, Antonio AgudoImage SegmentationRepresentation Learning