[论文解读] A Comparison of Supervised and Unsupervised Deep Learning Methods for Anomaly Detection in Images
本文使用 MVTec AD 数据集对比了监督式与非监督式深度学习方法在图像异常检测中的表现,评估了 CNN、KD-CAE、NI-CAE 和 DCGANs。结果表明,非监督式自编码器——尤其是 KD-CAE——在性能上优于监督式 CNN,而 NI-CAE 在 transistor 数据集上表现尤为出色,证实了当异常数据稀缺或无标签时,非监督式方法更具有效性。
Anomaly detection in images plays a significant role for many applications across all industries, such as disease diagnosis in healthcare or quality assurance in manufacturing. Manual inspection of images, when extended over a monotonously repetitive period of time is very time consuming and can lead to anomalies being overlooked.Artificial neural networks have proven themselves very successful on simple, repetitive tasks, in some cases even outperforming humans. Therefore, in this paper we investigate different methods of deep learning, including supervised and unsupervised learning, for anomaly detection applied to a quality assurance use case. We utilize the MVTec anomaly dataset and develop three different models, a CNN for supervised anomaly detection, KD-CAE for autoencoder anomaly detection, NI-CAE for noise induced anomaly detection and a DCGAN for generating reconstructed images. By experiments, we found that KD-CAE performs better on the anomaly datasets compared to CNN and NI-CAE, with NI-CAE performing the best on the Transistor dataset. We also implemented a DCGAN for the creation of new training data but due to computational limitation and lack of extrapolating the mechanics of AnoGAN, we restricted ourselves just to the generation of GAN based images. We conclude that unsupervised methods are more powerful for anomaly detection in images, especially in a setting where only a small amount of anomalous data is available, or the data is unlabeled.
研究动机与目标
- 评估监督式与非监督式深度学习模型在工业图像异常检测中的有效性。
- 解决实际应用中(如质量保证)异常数据有限或无标签的挑战。
- 探究在标注异常数据稀缺时,自编码器与 GAN 是否可作为监督学习的可行替代方案。
- 探索使用 GAN 进行数据增强以提升低数据场景下的异常检测性能。
提出的方法
- 使用完全标注的正常与异常图像,训练一个卷积神经网络(CNN)作为监督基线模型。
- 实现基于知识蒸馏的卷积自编码器(KD-CAE),仅从正常图像中学习鲁棒的特征表示。
- 在噪声注入卷积自编码器(NI-CAE)中引入噪声,以提升模型的鲁棒性与重建保真度。
- 训练深度卷积 GAN(DCGAN)以生成合成的正常图像,用于数据增强。
- 通过测量输入图像与重建图像之间的偏差,利用重建误差和结构相似性(SSIM)进行异常检测。
- 使用 F1 分数、精确率、召回率以及多个 MVTec AD 类别的重建质量视觉检查来评估模型性能。
实验结果
研究问题
- RQ1在工业图像数据集上,监督式深度学习模型(如 CNN)与非监督式自编码器在异常检测中的表现如何比较?
- RQ2噪声注入对卷积自编码器检测细微图像异常性能有何影响?
- RQ3GAN 生成的图像能否有效用于数据增强,以提升异常检测性能?
- RQ4在低数据或零异常场景下,监督式与非监督式方法中哪一种能获得更好的检测性能?
主要发现
- 基于 CNN 的监督式模型因缺乏足够的标注异常数据而表现不佳,尤其在小缺陷上的 F1 分数较低。
- KD-CAE 在大多数 MVTec AD 类别上均优于 CNN 与 NI-CAE,展现出更优的泛化能力与重建保真度。
- NI-CAE 在 transistor 数据集上表现最佳,当注入高斯噪声时,F1 分数仅下降 2.56%,表明其具有高度鲁棒性。
- 重建误差分布与 SSIM 差异图显示,KD-CAE 即使在复杂纹理区域也能有效突出异常区域。
- DCGAN 能成功生成逼真的牙刷图像,表明其在数据增强方面具有潜力,但由于计算资源限制,未测得性能提升。
- 对正常数据的过拟合在异常检测中有利,因为它降低了模型重建异常的能力,从而提高了检测灵敏度。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。