Segmenting Without Annotating: Crack Segmentation and Monitoring via Post-Hoc Classifier Explanations

Florent Forest, Hugo Porta, Devis Tuia, Olga Fink2023

Abstract

Monitoring cracks in infrastructure is vital for structural health monitoring (SHM). While deep learning models are effective for automated inspection, they typically require large, pixel-level annotated datasets for semantic segmentation. This work explores using post-hoc Explainable AI (XAI) attribution maps from a simple image classifier to generate segmentation masks, bypassing the need for expensive pixel-level labels. We benchmark several XAI methods on masonry wall crack detection and severity quantification, demonstrating that XAI can serve as a cost-effective proxy for damage monitoring.

Introduction

Maintaining the safety of bridges, roads, and buildings necessitates constant monitoring for structural damage. Automated visual inspection using deep learning has shown great promise, but its reliance on semantic segmentation—labeling every pixel—creates a significant data bottleneck. Creating these masks is labor-intensive and costly. In contrast, image-level classification labels ("cracked" vs. "not cracked") are much cheaper to obtain. This paper investigates whether the "explanations" of a classifier can produce high-quality segmentation masks, effectively providing segmentation at the cost of classification.

Methodology

The proposed approach follows a three-step pipeline:

  1. Classification: A VGG11 network is trained as a binary classifier to distinguish between cracked and non-cracked image patches.
  2. Attribution (Explanation): For patches identified as cracked, post-hoc XAI methods are applied to generate attribution maps. These maps highlight the pixels most influential to the model's decision. We evaluated methods including Input×Gradient, Integrated Gradients (IntGrad), DeepLift, DeepLiftShap, GradientShap, and Layer-wise Relevance Propagation (LRP).
  3. Post-processing: To convert noisy heatmaps into usable binary masks, we applied thresholding (simple or Gaussian Mixture Model-based) and morphological operations (closing and opening).
Comparison of various XAI attribution methods against the ground truth and a supervised U-Net oracle.

Experimental Results

The study utilized the Experimental DIC (digital image correlation) dataset of stone masonry wall patches (256×256 pixels). Performance was compared against a U-Net "oracle" trained on full pixel-level labels.

Segmentation Performance

While XAI-based methods do not yet match fully supervised models, they provide a strong baseline. DeepLiftShap with morphological post-processing achieved the highest F1 score among XAI methods (38.19%), followed by LRP (37.43%). In comparison, the U-Net oracle achieved 83.67%, indicating a "performance tax" for reduced annotation effort.

Severity Quantification

A key goal of SHM is monitoring crack evolution. We evaluated the accuracy of crack width quantification. LRP with simple thresholding achieved a Mean Absolute Percentage Error (MAPE) of 163.1%, compared to the oracle's 20.8%. Despite the higher error, the results show that XAI methods capture essential physical characteristics of the damage.

Detailed view of the LRP attribution map, which was one of the top-performing XAI methods for crack segmentation.

Discussion and Conclusion

The core insight is that attribution maps contain sufficient spatial information to act as "weak" supervisors for segmentation. However, post-processing is critical; raw maps are often too noisy for direct engineering use. Limitations include the "blobby" nature of some maps and difficulty capturing very thin cracks. Future work will focus on refining maps with edge detection and using XAI-derived masks to "warm-start" semi-supervised learning loops across diverse materials like concrete and asphalt.

Summary updated

BibTeX
@misc{forest2023segmenting,
  author = {Florent Forest and Hugo Porta and Devis Tuia and Olga Fink},
  title = {{Segmenting Without Annotating: Crack Segmentation and Monitoring via Post-Hoc Classifier Explanations}},
  year = {2023},
  doi = {10.3850/978-981-18-8071-1\_p290-cd},
}
Figure