[论文解读] Unsupervised Visual Defect Detection with Score-Based Generative Model
本文提出Score-DD,一种新颖的无监督视觉缺陷检测方法,通过随机微分方程(SDEs)的基于分数的生成建模,利用噪声重建结果的分数(对数概率密度梯度)来检测缺陷。通过采用T-scales策略加速推理,并以基于分数的度量替代重建损失,该方法在MVTec AD数据集上实现了最先进性能,且无需标注异常样本或额外模型。
Anomaly Detection (AD), as a critical problem, has been widely discussed. In this paper, we specialize in one specific problem, Visual Defect Detection (VDD), in many industrial applications. And in practice, defect image samples are very rare and difficult to collect. Thus, we focus on the unsupervised visual defect detection and localization tasks and propose a novel framework based on the recent score-based generative models, which synthesize the real image by iterative denoising through stochastic differential equations (SDEs). Our work is inspired by the fact that with noise injected into the original image, the defects may be changed into normal cases in the denoising process (i.e., reconstruction). First, based on the assumption that the anomalous data lie in the low probability density region of the normal data distribution, we explain a common phenomenon that occurs when reconstruction-based approaches are applied to VDD: normal pixels also change during the reconstruction process. Second, due to the differences in normal pixels between the reconstructed and original images, a time-dependent gradient value (i.e., score) of normal data distribution is utilized as a metric, rather than reconstruction loss, to gauge the defects. Third, a novel $T$ scales approach is developed to dramatically reduce the required number of iterations, accelerating the inference process. These practices allow our model to generalize VDD in an unsupervised manner while maintaining reasonably good performance. We evaluate our method on several datasets to demonstrate its effectiveness.
研究动机与目标
- 解决工业场景中缺陷样本极为稀少时的无监督视觉缺陷检测挑战。
- 克服基于重建的方法的局限性,即在去噪过程中正常像素被改变,导致像素级重建损失在异常检测中不可靠。
- 开发一种基于分数(对数概率密度梯度)的度量,更好地捕捉样本与正常数据分布高密度区域之间的距离。
- 通过引入T-scales技术,使用多条短反向轨迹替代长单条轨迹,加速基于分数模型的推理。
- 提供一种简单、高效且即插即用的无监督VDD解决方案,不依赖预训练网络、额外数据或复杂损失函数重设计。
提出的方法
- 该方法使用仅在正常图像上训练的基于分数的生成模型,通过SDEs迭代地将噪声去噪为真实样本。
- 引入两种反向过程:'全分数'用于引导噪声图像向正常数据的高密度区域演进,'自分数'用于从噪声中重建原始图像。
- 关键度量是全分数过程中间步骤的分数值(对数密度梯度),用于量化样本偏离正常分布的程度。
- T-scales技术选择多个初始噪声水平{t},并在每个水平上仅运行少量反向步骤(r),实现并行推理并减少总迭代次数。
- 通过比较同一张图像的两个噪声版本的分数值——一个来自全分数,一个来自自分数——实现缺陷定位,分数值差异越大表示异常越明显。
- 该方法完全避免使用重建损失,转而使用基于概率密度的原理性度量——分数,更准确地反映异常的严重程度。
实验结果
研究问题
- RQ1在无监督设置下,去噪图像的分数(对数密度梯度)能否作为比重建损失更可靠的视觉缺陷检测度量?
- RQ2为何现有方法中正常像素在重建过程中会发生偏移?能否通过使用基于分数的度量来缓解此问题?
- RQ3能否在不牺牲检测精度的前提下,显著加速基于分数模型的推理速度?
- RQ4使用多条短反向轨迹(T-scales)是否能通过保留更多原始像素保真度来提升检测性能?
- RQ5基于分数的模型能否在不依赖预训练特征、外部数据或复杂损失函数的情况下,实现无监督VDD的竞争力表现?
主要发现
- 消融实验证实,基于分数的度量在VDD中优于重建损失,MVTec AD上的实验表明,基于分数的检测方法AU-ROC高于基于重建损失的方法。
- T-scales技术将MVTec AD数据集上的推理时间复杂度从O(251)降低至O(15),显著快于基线分数模型(如AnoDDPM)。
- 该方法在MVTec AD上实现了具有竞争力的性能,且未使用任何标注异常样本、预训练网络或辅助模型。
- 消融研究证实,T-scales通过限制每条轨迹的反向步骤数,保留了更多原始像素信息,减少了正常区域的失真。
- 该方法对正常数据的分布偏移具有鲁棒性,并在多种工业缺陷类型上表现出良好的泛化能力,已在多个数据集上得到验证。
- 尽管对固定特征图选择较为敏感,该方法仍保持强性能,未来可扩展为集成自监督或半监督头。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。