Applied Research

Attention‐Enhanced SegFormer for Pixel‐Level Concrete Crack Detection Under Complex Crack Conditions

Zhang Jing, Hong Qi

Key points

From the paper's conclusion
  • To improve the feature representation ability of SegFormer under complex crack conditions, this study proposes an attention‐enhanced SegFormer model, termed AF‐SegFormer, for pixel‐level concrete crack detection.

Abstract

Accurate pixel‐level concrete crack detection is essential for evaluating surface damage, supporting structural maintenance and improving the reliability of infrastructure health monitoring. Although convolutional neural network‐based segmentation models have been widely used for crack detection, their local receptive fields may limit the representation of long‐range contextual information, while Transformer‐based models such as SegFormer still face challenges in detecting thin, discontinuous and irregular cracks embedded in complex concrete backgrounds. To improve the feature representation ability of SegFormer under complex crack conditions, this study proposes an attention‐enhanced SegFormer model, termed AF‐SegFormer, for pixel‐level concrete crack detection. The proposed model introduces a CBAM‐based attention‐enhanced decoder into the SegFormer framework to achieve attention‐enhanced feature fusion from both channel and spatial dimensions. Channel attention strengthens feature channels that are more responsive to crack‐related patterns, whereas spatial attention helps the decoder focus on potential crack regions and suppress irrelevant background responses. The model was trained and evaluated using concrete surface images and corresponding binary crack masks, with SegFormer, U‐Net, Attention U‐Net, DeepLabV3+ and DTrC‐Net used as comparative models. The results show that all six models achieved high Pixel Accuracy values ranging from 0.980 to 0.981. Compared with the baseline SegFormer, AF‐SegFormer increased Precision from 0.599 to 0.618 while maintaining comparable mIoU and IoU values of 0.765 and 0.425, respectively. Further crack‐density‐based analysis demonstrated that AF‐SegFormer outperformed SegFormer in terms of Precision, Recall, mIoU and IoU in the two highest crack‐density intervals. Crack density is used here only as a descriptive subgroup variable rather than as a direct measure of crack complexity. These findings indicate that AF‐SegFormer provides a precision‐oriented modification of the SegFormer framework for concrete crack segmentation, without a uniform improvement across overall segmentation metrics. The ablation results further clarify this behaviour. Channel attention alone mainly increases Precision, while spatial attention retains more of the baseline Recall and IoU. Combining both components in A3 produces the highest Precision, and the lower performance of the per‐scale pre‐fusion A4 variant relative to A3 indicates that the attention placement also affects the resulting feature refinement.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

Attention‐Enhanced SegFormer for Pixel‐Level Concrete Crack Detection Under Complex Crack Conditions — Science Skim