
科学技术与工程

中国技术经济学会
Algorithm for Detecting Surface Defects in Industrial Products with Few Samples Based on Feature Recall
Jian-xin LI , Wei-ping LUO , Yi-fan ZOU , Ya-peng ZHANG
Science Technology and Engineering ›› 2025, Vol. 25 ›› Issue (36) : 15615 -15621.
Surface defect detection in industrial products is of great significance in industrial production, as it can effectively improve product quality, reduce production costs, and increase production efficiency. Current surface defect detection in industrial products primarily relies on deep learning algorithms. However, in practical production, the insufficient sample size and high collection costs severely limit the application value of deep learning-based defect detection algorithms. To address this issue, a few-shot industrial product surface defect detection algorithm based on feature recall was proposed. This algorithm approached the problem from both zero-shot learning and few-shot learning perspectives: for zero-shot learning, abnormal image-level scores were obtained with the help of normal/abnormal prompts, for few-shot learning, image-level abnormal scores were calculated from both image tokens and pixel tokens using a feature recall approach. By combining the zero-shot and few-shot modules, the final defect score for the sample to be tested was obtained. The results show that, with sample sizes of 2, 4, and 8, the proposed few-shot defect detection algorithm achieves the best performance on the MvTec AD and VisA datasets, validating the effectiveness of the algorithm in few-shot scenarios. To further validate the effectiveness of the algorithm in real-world scenarios, metal surface defect detection on the KolektorSDD dataset was conducted. Experimental results show that randomly sampling eight normal samples, the proposed algorithm achieves a detection accuracy of 0.961, demonstrating considerable potential for practical industrial applications.
feature recall / few-shot learning / defect detection / computer vision
/
| 〈 |
|
〉 |