Accurate pixel-level crack detection and geometric quantification are essential for bridge structural health monitoring. However, existing deep learning methods often struggle to delineate fine and discontinuous crack boundaries under complex backgrounds, while traditional edge detection methods such as Canny are inherently non-differentiable and cannot be optimized end-to-end within neural networks. To address these limitations, this study proposes a novel bridge crack detection framework based on a Dynamic Edge Gating U-Net (DEGU-Net), in which the classical Canny operator is reformulated as a fully differentiable module. Specifically, soft-weighted non-maximum suppression and multi-directional gradient estimation are introduced to replace hard thresholding and discrete local maxima selection, enabling stable gradient propagation and end-to-end training without explicit edge supervision. Furthermore, a dynamic edge gating mechanism is designed to adaptively fuse multi-scale edge priors with semantic features, and a channel-spatial attention mechanism is embedded to enhance crack boundary discrimination and suppress background interference. These components jointly improve semantic-edge consistency, particularly for thin and low-contrast cracks. In addition to segmentation, an integrated pipeline is developed for crack type classification and geometric quantification of crack length and width. Experiments on a large-scale dataset of 20,000 crack images demonstrate that DEGU-Net outperforms both general-purpose semantic segmentation models and representative crack-aware baselines, achieving a precision of 93.76%, a recall of 91.82%, an F1-score of 92.78%, and an MIoU of 73.25%, indicating strong performance in both crack boundary delineation and segmentation completeness. Field tests on full-scale bridge inspections in Xinjiang further validate its robustness, with geometric measurement errors below 10%.
Yin et al. (Tue,) studied this question.