Flownomaly:基于 DINOv2 的单步少样本工业异常检测方法
Flownomaly: Single-Step Conditional-Mean Recovery for Few-Shot Anomaly Detection
一篇少样本工业质检的论文:只用几张正常图,单步流匹配就能在 MVTec-AD 上拿到 97.8% AUROC,代码也开源了,搞缺陷检测的可以看看。
Flownomaly 将少样本异常检测建模为在冻结 DINOv2 特征空间中恢复正常对应物的问题,通过条件流匹配学习速度场,单步即可得到干净正常 token 的后验均值。参数选择无需异常验证样本,仅凭正常支持集的 Jacobian 增益-噪声准则即可确定。在 MVTec-AD 的 1-shot 设置下,图像级和像素级 AUROC 分别达到 97.8% 和 98.0%;在 VisA 上分别为 95.3% 和 98.7%,图像级 AUROC 比最强基线提升 2.1 个百分点。代码已在 GitHub 开源。
Flownomaly: Single-Step Conditional-Mean Recovery for Few-Shot Anomaly Detection
Few-shot industrial anomaly detection requires modeling category-specific normality from only a handful of defect-free images. Common approaches tie inference to stored exemplars, impose rigid linear structure, or risk reproducing anomalous content. Flownomaly instead casts the problem as normal-counterpart recovery in frozen DINOv2 feature space. Given normal supports, a velocity field is learned through conditional flow matching over frozen patch tokens to transport Gaussian noise toward normal features. Along straight paths, a single recovery step using one evaluation of the optimal field yields the posterior mean of the clean normal token without trajectory integration. The operating time governs how strongly recovery modifies a query token. With no anomalous validation samples available for tuning, a normal-only Jacobian gain-to-noise criterion selects this time from the supports alone. Squared residuals between query tokens and their recovered counterparts yield anomaly signals for both dense localization and image-level detection. Across 1-, 2-, and 4-shot benchmarks on MVTec-AD and VisA, together with sample-shot evaluations on Real-IAD, Flownomaly achieves state-of-the-art performance against recent category-specific methods. In the 1-shot setting, image- and pixel-level AUROC reach 97.8% and 98.0% on MVTec-AD and 95.3% and 98.7% on VisA, with a 2.1-point image-level AUROC improvement over the strongest baseline on VisA. Code is available at https://github.com/b-rbmp/Flownomaly.