BAR-UNet: a boundary-aware and appearance-robust framework for polyp segmentation
Abstract
Background Colorectal cancer is a leading cause of cancer-related mortality, and reliable polyp segmentation during colonoscopy is critical for early intervention. Existing deep learning segmentors often produce blurred boundaries and are sensitive to appearance variation across endoscopy devices. Methods We propose BAR-UNet, a ResNet-34 encoder–decoder with a boundary-aware head and mask-guided appearance consistency learning (MACL). On the public Kvasir-SEG dataset we compare BAR-UNet with classical semantic segmentors (FCN-ResNet50, DeepLabV3-ResNet50), detection-based segmentors (YOLOv8-Seg, YOLOv11-Seg, Mask R-CNN), polyp-specific CNN baselines, and modern enhanced segmentors (DeepLabV3+, SegFormer-B2, MedSAM, SAM-Med2D) under a unified 70/10/20 split, multi-seed evaluation protocol. Results BAR-UNet achieves Dice 0.8798 ±0.0024 and IoU 0.7913 ± 0.0029 on Kvasir-SEG, outperforming all compared methods. Zero-shot evaluation on CVC-ClinicDB, CVC-ColonDB, and ETIS-Larib yields Dice/IoU of 0.831/0.748, 0.776/0.682, and 0.728/0.631, respectively. Ablation studies, boundary metrics (F1^bd, MAE, HD95), paired Wilcoxon tests, and MACL sensitivity analyses confirm that the boundary head and MACL are complementary. Discussion BAR-UNet improves boundary precision and appearance robustness with modest computational overhead on an NVIDIA RTX 4060 GPU. The method is a promising research prototype for computer-aided polyp analysis; prospective clinical validation is required before deployment.