EAAI Journal 2026 Journal Article
A topology-aware segment anything model for domain-invariant crack segmentation
- Xue Li
- Siyi Yu
- Shiyun Xiao
- Xiangbo Lin
- Zihan Zhao
Structural cracks play a vital role in prolonging the life of engineering structures and assessing safety risks. The precise segmentation and analysis of cracks has become challenging because of the complexity of background and diversity of morphology. In this study, we offer TopoSAM, a topology-aware model based on the Segment Anything Model (SAM) for domain-invariant crack segmentation. Particularly, we add a branch called Topology Serpentine Convolution Branch (TSCB) for recognizing the topological geometry and detailed features of the cracks in accordance with the characteristics of structural cracks. Cross Branch Fusor (CBF) is designed to fuse the features from TSCB and Image Encoder of SAM. Additionally, we present Background Adversarial Twin Learning(BATL) to remove the impact of background noise on the segmentation performance. The constructed twin samples with the same crack content but different backgrounds are sent into TopoSAM to participate in the training together, making the model actively ignore the background changes and concentrate on the structural cracks. TopoSAM is evaluated with seven publicly datasets. The experimental results demonstrate that TopoSAM outperforms the current state-of-the-art algorithms in generalization and has intense competition in crack segmentation accuracy.