基于风格记忆的跨域小样本异常检测
Style-Aware Cross Domain Few-Shot Anomaly Detection
-
摘要: 小样本异常检测仅利用少量正常样本进行检测和异常定位, 现有的小样本异常检测方法的训练和测试都在相同的域中进行, 对于跨域场景的研究尚处于空白. 针对跨域小样本异常检测问题, 为了将源域学到的知识迁移到目标域中进行小样本异常检测, 提出基于风格记忆的跨域小样本异常检测方法. 该方法包含 2 个模块, 首先将域差异定义为风格特征差异, 设计风格记忆模块存储来自源域的域内统计特征, 并将学习到的特征集成到目标域中, 减少域差异带来的影响, 提升性能; 然后引入对比学习策略, 区分不同类别的增强查询特征, 进一步加强模型对源域中不同类别的表征能力. 在 MVTec AD, MPDD 和 MVTec LOCO-AD 数据集间进行跨域小样本异常检测任务实验, 结果表明, 与代表方法相比, 所提方法取得了最佳性能, 其中, 图像 AUROC 指标提升 3%~5%; 在本域内小样本异常检测任务上, 该方法仍然有优异的表现.Abstract: Few-shot anomaly detection involves using a limited number of normal samples to detect and localize anomalies. While existing methods for few-shot anomaly detection are primarily applied within the same domain, research on cross-domain scenarios remains limited. To address the problem of cross-domain few-shot anomaly detection, a cross-domain few-shot anomaly detection method based on style memory is proposed. This method includes two modules. The first module defines domain differences in terms of differences in style features and employs a style memory module to store intra-domain statistical features from the source domain. These features are then integrated into the target domain to mitigate the impact of domain differences and enhance few-shot detection performance. Then, a contrastive learning strategy is introduced to distinguish enhanced query features of different categories, further enhancing the model’s ability to represent different categories in the source domain. Experiments on cross-domain few-shot anomaly detection tasks between the MVTec AD, MPDD and MVTec LOCO-AD datasets show that the proposed method achieves the best performance compared to the represntative methods, with an image AUROC indicator increase of 3% to 5%. Moreover, the proposed model still has the best performance on the few-shot anomaly detection task under the intra-domain setting.