Self-supervised Surface Defect Inspection Method via Alignment of Content and Style
摘要
Deep learning surface defect inspection has demonstrated remarkable potential in industrial quality control. Most existing works transfer knowledge to defect inspection tasks. This knowledge is acquired from natural datasets by self-supervised learning (SSL). However, these methods face dual challenges: (1) data scarcity in defect datasets leading to unstable training and overfitting, and (2) the minimal intermediate domain between natural and defect domains, which results in a significant domain gap in content and style. To overcome these challenges, this paper proposes AlCS, a self-supervised surface defect inspection method via alignment of content and style. AlCS achieves content and style alignment between defect and natural domains through style transfer data augmentation, enhancing model generalization and stabilizing the training process. Our approach consists of two parts. First, the Style Transfer Module (STM). It constructs samples that exhibit intermediate domain characteristics. The samples enlarge the intermediate domain to bridge the domain gap. Second, a content-style domain adaptation architecture that includes the Content Alignment Module (CAM) and the Style Alignment Module (SAM). It decouples and hierarchically aligns the content and style features of the constructed samples. Experiments on several industrial defect datasets demonstrate that our approach outperforms existing SSL methods in surface defect inspection tasks.