Image anomaly detection and localization perform not only image-level anomaly classification but also locate pixel-level anomaly regions. Recently, it has received much research attention due to its wide application in various fields. This paper proposes ProtoAD, a prototype-based neural network for image anomaly detection and localization. First, the patch features of normal images are extracted by a deep network pre-trained on nature images. Then, the prototypes of the normal patch features are learned by non-parametric clustering. Finally, we construct an image anomaly localization network (ProtoAD) by appending the feature extraction network with $L2$ feature normalization, a $1\times1$ convolutional layer, a channel max-pooling, and a subtraction operation. We use the prototypes as the kernels of the $1\times1$ convolutional layer; therefore, our neural network does not need a training phase and can conduct anomaly detection and localization in an end-to-end manner. Extensive experiments on two challenging industrial anomaly detection datasets, MVTec AD and BTAD, demonstrate that ProtoAD achieves competitive performance compared to the state-of-the-art methods with a higher inference speed. The source code is available at: https://github.com/98chao/ProtoAD.
翻译:图像异常检测与定位不仅需要完成图像级别的异常分类,还需定位像素级的异常区域。近年来,该技术因其在多个领域的广泛应用而受到研究界的广泛关注。本文提出ProtoAD——一种基于原型的图像异常检测与定位神经网络。首先,通过预训练于自然图像上的深度网络提取正常图像的块特征;其次,利用非参数聚类学习正常块特征的原型;最后,通过为特征提取网络附加L2特征归一化、1×1卷积层、通道最大池化及减法操作,构建图像异常定位网络(ProtoAD)。我们将原型作为1×1卷积层的卷积核,因此该神经网络无需训练阶段,即可实现端到端的异常检测与定位。在MVTec AD和BTAD两个具有挑战性的工业异常检测数据集上的大量实验表明,ProtoAD在保持较高推理速度的同时,取得了与最先进方法相媲美的性能。源代码开源地址:https://github.com/98chao/ProtoAD。