A Lightweight Distance-Aware Loss for Thin Crack Segmentation in Building Facades under Limited-Data Conditions
Open Access
- 15 March 2026
- journal article
- Published by IntSys Research in Journal of Future Artificial Intelligence and Technologies
- Vol. 3 (1) , 19-35
Abstract
Thin crack segmentation in building facades is particularly challenging under limited data conditions due to the extremely narrow geometry and weak contrast of crack structures. Conventional overlap-based loss functions, such as Binary Cross-Entropy (BCE) and Dice loss, optimize pixel-wise agreement but do not explicitly account for spatial boundary relevance, often resulting in fragmented predictions and geometric misalignment. This study introduces a lightweight distance-aware weighting extension of Dice loss designed to improve boundary alignment without modifying the network architecture. The proposed approach integrates Euclidean distance information derived from ground-truth masks to assign higher importance to prediction errors near crack boundaries while reducing the influence of distant background regions. The method is evaluated on a real-world dataset of 108 facade images (87 training and 21 validation) using a standard U-Net architecture under identical training conditions. Experimental results demonstrate a consistent reduction in geometric boundary error. The 95th percentile Hausdorff Distance (HD95) decreases from 230.08 px with BCE and 217.55 px with Dice loss to 148.28 px with the proposed distance-aware formulation, corresponding to reductions of approximately 81.8 px and 69.3 px, respectively. In addition, the proposed loss improves overlap-based metrics, achieving IoU@0.1 = 0.2844 and Dice = 0.4087 on the validation set. These results indicate that incorporating spatial distance information into the optimization objective improves geometric alignment and structural continuity of thin crack predictions. The findings suggest that integrating lightweight distance-aware weighting into conventional loss formulations can improve segmentation quality for thin structures in constrained-data scenarios while maintaining computational simplicity.Keywords
This publication has 31 references indexed in Scilit:
- Domain adversarial training for classification of cracking in images of concrete surfacesAI in Civil Engineering, 2022
- Sharp U-Net: Depthwise convolutional network for biomedical image segmentationComputers in Biology and Medicine, 2021
- Loss odyssey in medical image segmentationMedical Image Analysis, 2021
- Boundary loss for highly unbalanced segmentationMedical Image Analysis, 2021
- DeepCrack: A deep hierarchical feature learning architecture for crack segmentationNeurocomputing, 2019
- Generalised Dice Overlap as a Deep Learning Loss Function for Highly Unbalanced Segmentations2017
- DeepVessel: Retinal Vessel Segmentation via Deep Learning and Conditional Random Field2016
- 3D U-Net: Learning Dense Volumetric Segmentation from Sparse Annotation2016
- U-Net: Convolutional Networks for Biomedical Image Segmentation2015
- Learning to Detect Roads in High-Resolution Aerial Images2010