With the rapid advances in deep learning and smart manufacturing in Industry 4.0, there is an imperative for high-throughput, high-performance, and fully integrated visual inspection systems. Most anomaly detection approaches using defect detection datasets, such as MVTec AD, employ one-class models that require fitting separate models for each class. On the contrary, unified models eliminate the need for fitting separate models for each class and significantly reduce cost and memory requirements. Thus, in this work, we experiment with considering a unified multi-class setup. Our experimental study shows that multi-class models perform at par with one-class models for the standard MVTec AD dataset. Hence, this indicates that there may not be a need to learn separate object/class-wise models when the object classes are significantly different from each other, as is the case of the dataset considered. Furthermore, we have deployed three different unified lightweight architectures on the CPU and an edge device (NVIDIA Jetson Xavier NX). We analyze the quantized multi-class anomaly detection models in terms of latency and memory requirements for deployment on the edge device while comparing quantization-aware training (QAT) and post-training quantization (PTQ) for performance at different precision widths. In addition, we explored two different methods of calibration required in post-training scenarios and show that one of them performs notably better, highlighting its importance for unsupervised tasks. Due to quantization, the performance drop in PTQ is further compensated by QAT, which yields at par performance with the original 32-bit Floating point in two of the models considered.
翻译:随着工业4.0时代深度学习与智能制造的快速发展,对高吞吐量、高性能且完全集成的视觉检测系统提出了迫切需求。当前大多数采用缺陷检测数据集(如MVTec AD)的异常检测方法使用单类别模型,需要为每个类别单独训练模型。相比之下,统一模型无需为每个类别单独训练模型,能显著降低计算成本与内存需求。因此,本研究尝试构建统一的多类别检测框架。实验研究表明,在标准MVTec AD数据集上,多类别模型性能与单类别模型相当。这表明当物体类别间存在显著差异时(如本研究所用数据集),可能无需为不同物体/类别单独训练模型。此外,我们在CPU及边缘设备(NVIDIA Jetson Xavier NX)上部署了三种不同的统一轻量级架构。通过量化感知训练(QAT)与训练后量化(PTQ)在不同精度位宽下的性能对比,我们系统分析了量化多类别异常检测模型在边缘设备部署时的延迟与内存需求。同时,我们探索了训练后量化场景中两种不同的校准方法,证明其中一种方法性能显著更优,这凸显了校准技术在无监督任务中的重要性。通过量化感知训练,训练后量化带来的性能下降得以补偿,在两种测试模型中实现了与原始32位浮点模型相当的性能表现。