Attentive Boundary-Aware Fusion for Defect Semantic Segmentation Using Transformer
Ching-Chi Yeung, Kin‐Man Lam
Abstract
Defect semantic segmentation is a pixel-level inspection technique to guarantee the quality of various products. It can obtain the precise location of defects by assigning a class label to each image pixel. Due to the confusing appearance of various defects, most existing defect semantic segmentation methods still suffer from the problem of intra-class difference and inter-class indiscrimination. To tackle these challenges, we propose an attentive boundary-aware transformer framework, namely ABFormer, for segmenting different types of defects. Specifically, we propose a split-attention boundary-aware fusion (SABF) to split and integrate boundary and context features with two different attention modules. It can enrich and fuse the feature maps more efficiently. Moreover, we propose a boundary-aware spatial attention module (BSAM) to capture the spatial interdependencies between the positions of boundary features and context features. This module can enhance the consistency of defect features of the same class for solving the intra-class difference problem. Furthermore, we propose a boundary-aware channel attention module (BCAM) to model the semantic relationship between the channels of boundary features and context features. This module can reinforce the discrimination between defect features of different classes for handling the inter-class indiscrimination problem. Experimental results on three defect semantic segmentation datasets, namely NEU-Seg, MT-Defect, and MSD, demonstrate that our proposed method outperforms the state-of-the-art methods.