Industrial defect segmentation is critical for manufacturing quality control. Due to the scarcity of training defect samples, few-shot semantic segmentation (FSS) holds significant value in this field. However, existing studies mostly apply FSS to tackle defects on simple textures, without considering more diverse scenarios. This paper aims to address this gap by exploring FSS in broader industrial products with various defect types. To this end, we contribute a new real-world dataset and reorganize some existing datasets to build a more comprehensive few-shot defect segmentation (FDS) benchmark. On this benchmark, we thoroughly investigate metric learning-based FSS methods, including those based on meta-learning and those based on Vision Foundation Models (VFMs). We observe that existing meta-learning-based methods are generally not well-suited for this task, while VFMs hold great potential. We further systematically study the applicability of various VFMs in this task, involving two paradigms: feature matching and the use of Segment Anything (SAM) models. We propose a novel efficient FDS method based on feature matching. Meanwhile, we find that SAM2 is particularly effective for addressing FDS through its video track mode. The contributed dataset and code will be available at: https://github.com/liutongkun/GFDS.
翻译:工业缺陷分割对于制造业质量控制至关重要。由于缺陷训练样本稀缺,少样本语义分割在该领域具有重要价值。然而,现有研究大多将少样本分割方法应用于简单纹理的缺陷检测,未考虑更复杂的工业场景。本文旨在通过探索少样本分割在更广泛的工业产品及多种缺陷类型中的应用来填补这一空白。为此,我们贡献了一个新的真实世界数据集,并重组了部分现有数据集,构建了更全面的少样本缺陷分割基准。在此基准上,我们系统研究了基于度量学习的少样本分割方法,包括基于元学习的方法和基于视觉基础模型的方法。我们发现,现有基于元学习的方法普遍不适用于该任务,而视觉基础模型展现出巨大潜力。我们进一步系统研究了各类视觉基础模型在该任务中的适用性,涉及特征匹配和使用Segment Anything模型两种范式。我们提出了一种基于特征匹配的新型高效少样本缺陷分割方法。同时,我们发现SAM2通过其视频追踪模式在处理少样本缺陷分割任务时表现尤为出色。贡献的数据集与代码将在以下地址公开:https://github.com/liutongkun/GFDS。