Source-Free Test-Time Adaptation For Online Surface-Defect Detection

Yiran Song,Qianyu Zhou,Lizhuang Ma
2024-08-18
Abstract:Surface defect detection is significant in industrial production. However, detecting defects with varying textures and anomaly classes during the test time is challenging. This arises due to the differences in data distributions between source and target domains. Collecting and annotating new data from the target domain and retraining the model is time-consuming and costly. In this paper, we propose a novel test-time adaptation surface-defect detection approach that adapts pre-trained models to new domains and classes during inference. Our approach involves two core ideas. Firstly, we introduce a supervisor to filter samples and select only those with high confidence to update the model. This ensures that the model is not excessively biased by incorrect data. Secondly, we propose the augmented mean prediction to generate robust pseudo labels and a dynamically-balancing loss to facilitate the model in effectively integrating classification and segmentation results to improve surface-defect detection accuracy. Our approach is real-time and does not require additional offline retraining. Experiments demonstrate it outperforms state-of-the-art techniques.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve a key challenge faced by surface - defect detection (SDD) in industrial production: during the testing phase, the model needs to adapt to new data distributions with different textures and anomaly categories. Specifically, the paper addresses the following issues: 1. **Cross - domain data distribution differences**: - The data distribution differences between the training data (source domain) and the testing data (target domain) lead to a decline in model performance. For example, different textures and new defect categories will appear in the testing data. 2. **Online adaptation requirements**: - In industrial scenarios, the testing data arrives continuously and is usually unlabeled. Therefore, a method that can adapt to new data distributions in real - time is required, without the need to recollect and relabel new data or perform offline retraining. 3. **Handling of new categories and complex textures**: - Unlike traditional test - time adaptation (TTA) methods, entirely new defect categories and complex texture information may appear in the target domain in industrial scenarios, which have not been seen in the source domain. 4. **Limited data volume**: - Industrial datasets are usually much smaller than classical datasets, which makes the model more likely to encounter unseen knowledge and may lead to a decline in performance during inference. To solve these problems, the authors propose a novel online test - time adaptation method that enables a pre - trained model to adapt to new target domains and categories without using source - domain data and without the need for offline retraining. Specifically, the paper proposes the following two core ideas: - **Supervisor**: It is used to filter samples and only select high - confidence samples to update the model, in order to prevent the model from being overly biased by wrong data. - **Enhanced average prediction and dynamic balance loss**: Generate stable pseudo - labels and improve the accuracy of classification and segmentation results by dynamically adjusting the loss function, thereby improving the performance of surface - defect detection. Through experimental verification, this method outperforms the existing state - of - the - art methods on multiple industrial datasets.