Defect segmentation holds significant importance in industrial applications. However, most existing algorithms are tailored to specific scenarios, lacking a unified defect segmentation algorithm for defect segmentation. Based on the analysis of the characteristics of defects, we aim to propose a unified transformer‐based defect segmentation algorithm. On the one hand, the defect foreground exhibits significant differences from the normal background. Nevertheless, the attention mechanism in the transformer involves all feature nodes in the feature map to the similarity score of one patch with all other patches. This approach may compromise the features of potential defect areas where the defect foreground significantly contrasts with the background. We introduce the Attention Similarity Outlier Suppression (ASOS) strategy to address this challenge. Our method is designed to select valid attention scores and filter out outlier scores for appropriate attention fusion, in which the feature of potential defect areas is not easily affected by background. On the other hand, the defect regions often have relatively small areas. We incorporate a Hierarchical Feature Integration (HFI) module in our framework to facilitate defect recognition at different scales. By progressively up‐sampling, features can achieve better integration to generate the final segmentation result. Extensive experiments have verified the effectiveness of our proposed method in defect segmentation tasks. Moreover, thorough ablation studies have demonstrated the efficacy of our algorithm, reinforcing its robust performance. © 2024 Institute of Electrical Engineers of Japan and Wiley Periodicals LLC.
Read full abstract