This study proposes a lightweight and high-performance crack segmentation framework based on a MobileNet U-Net architecture, enhanced through self-supervised learning (SSL) and a multi-head attention mechanism. The encoder is pretrained using a self-supervised image inpainting task on grayscale images, enabling the network to learn robust visual representations without relying on large volumes of annotated data. To improve spatial awareness and crack localization, the decoder integrates multi-head attention modules that refine feature aggregation and boundary sensitivity. The model is trained for 150 epochs using an AdaptiveLoss function that combines Dice Loss and Boundary Loss, allowing simultaneous optimization of regional segmentation consistency and boundary delineation. With approximately 2.94 million trainable parameters, the proposed framework maintains a strong balance between computational efficiency and segmentation performance. Experimental evaluation on a crack segmentation dataset demonstrates strong performance, achieving 98.62% validation accuracy while maintaining stability across diverse surface conditions. To further assess generalization capability, cross-dataset evaluation is conducted on the CRACK500 road pavement crack dataset, where the model achieves an IoU of 0.6329 and a Dice coefficient of 0.7506. In addition, the framework demonstrates real-time inference capability, achieving 112.7 FPS on GPU and 34.1 FPS on CPU, with only 2.94 M parameters and 2.109G MACs. These results highlight the proposed model as an efficient and practical solution for real-time, edge-compatible crack detection in structural health monitoring and automated infrastructure inspection systems.
Wei et al. (Sun,) studied this question.