Context-Guided Hard-Negative Background Suppression for Crack Segmentation on Complex-Texture Farmland Roads
Niangzhi Mao, Shihai Ding, Yajie Zhang, Xiaoping Chen, Changfa Ai, Bowen ZhouField-road cracks in high-standard farmland are often slender, low-contrast, and surrounded by complex textures that cause U-Net-based models to misclassify aggregates, tire marks, shadows, and repair edges as cracks. To reduce these false positives, this study develops a task-oriented context-guided hard-negative background suppression network (CGHN-Net) based on Squeeze-and-Excitation U-Net (SE-U-Net). The context-guided skip gate (CGSG), a same-resolution adaptation of additive attention gating, uses already upsampled decoder features as semantic guides to filter encoder skip features at all three scales. Hard-negative background suppression loss (HNBS Loss), a background-restricted hard-example mining objective, further targets elevated-probability responses within ground-truth background regions. The dataset comprised 2235 vehicle-acquired grayscale pavement images from independent sessions and mutually exclusive road sections: 1684 for training, 464 for validation, and 87 for testing. Across three random seeds, CGHN-Net achieved Dice, IoU, precision, recall, and FP area ratio values of 0.8682 ± 0.0055, 0.7791 ± 0.0102, 0.8780 ± 0.0161, 0.8734 ± 0.0266, and 0.0042 ± 0.0008, respectively. Against U-Net, Attention U-Net, UNet++, DeepLabV3+, SegFormer-B0, and BGCrack, it achieved the highest Dice, IoU, and recall, indicating the strongest overall overlap and crack recovery. Sequence-aware paired analysis against UNet++ preserved contiguous acquisition order through block lengths of 3, 5, and 10 images, and all block-bootstrap confidence intervals excluded zero. On 100 held-out crack-free images, CGHN-Net also achieved the lowest post-processed image-level false-alarm rate and FP area ratio among the included models. Additional three-seed validation on the independently acquired public CrackForest Dataset (CFD), with the selected models retrained on mutually exclusive CFD partitions, showed that CGHN-Net achieved Dice, IoU, and recall of 0.6679 ± 0.0162, 0.5028 ± 0.0182, and 0.9486 ± 0.0085, respectively, exceeding UNet++ and BGCrack in overlap and crack recovery. The results support the task-oriented combination of same-resolution skip filtering and background-restricted hard-example mining for suppressing texture-induced false responses, while the CFD experiment is interpreted as independent public-dataset retraining rather than zero-shot transfer.