
科学技术与工程

中国技术经济学会
基于特征召回的少样本工业产品表面缺陷检测算法
Algorithm for Detecting Surface Defects in Industrial Products with Few Samples Based on Feature Recall
工业产品表面缺陷检测在工业生产中意义重大,可有效提高产品质量、降低生产成本和提高生产效率。现有的工业产品表面缺陷检测以深度学习算法为主。然而实际生产中样本规模不足且收集成本高,严重限制了基于深度学习的缺陷检测算法的应用价值。针对上述问题,提出一种基于特征召回的少样本工业产品表面缺陷检测算法。该算法从零样本学习和少样本学习两个角度出发:基于零样本学习,借助正常/异常提示词获得图像级异常得分;基于少样本学习,从图像令牌和像素令牌两个方面采用特征召回的方式计算图像级异常得分。综合零样本和少样本模块,即可获得最终的待测样本缺陷评分。结果表明:当样本数分别为2、4和8时,提出的少样本缺陷检测算法在MvTec AD和VisA数据集上均取得了最好的效果,验证了所提算法在少样本场景下的有效性。为了进一步验证所提算法在真实场景的有效性,在KolektorSDD数据集上进行金属表面缺陷检测。实验结果表明:随机采样8张正常样本,所提算法达到0.961的检测精度,具备可观的实际工业场景应用价值。
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
/
| 〈 |
|
〉 |