Anomaly Detection is challenging as usually only the normal samples are seen during training and the detector needs to discover anomalies on-the-fly. The recently proposed deep-learning-based approaches could somehow alleviate the problem but there is still a long way to go in obtaining an industrial-class anomaly detector for real-world applications. On the other hand, in some particular AD tasks, a few anomalous samples are labeled manually for achieving higher accuracy. However, this performance gain is at the cost of considerable annotation efforts, which can be intractable in many practical scenarios. In this work, the above two problems are addressed in a unified framework. Firstly, inspired by the success of the patch-matching-based AD algorithms, we train a sliding vision transformer over the residuals generated by a novel position-constrained patch-matching. Secondly, the conventional pixel-wise segmentation problem is cast into a block-wise classification problem. Thus the sliding transformer can attain even higher accuracy with much less annotation labor. Thirdly, to further reduce the labeling cost, we propose to label the anomalous regions using only bounding boxes. The unlabeled regions caused by the weak labels are effectively exploited using a highly-customized semi-supervised learning scheme equipped with two novel data augmentation methods. The proposed method outperforms all the state-of-the-art approaches using all the evaluation metrics in both the unsupervised and supervised scenarios. On the popular MVTec-AD dataset, our SemiREST algorithm obtains the Average Precision (AP) of 81.2% in the unsupervised condition and 84.4% AP for supervised anomaly detection. Surprisingly, with the bounding-box-based semi-supervisions, SemiREST still outperforms the SOTA methods with full supervision (83.8% AP) on MVTec-AD.
翻译:异常检测具有挑战性,因为训练时通常只能看到正常样本,检测器需要能够即时发现异常。近期提出的深度学习方法可在一定程度上缓解该问题,但距离在实际应用中获得工业级异常检测器仍有较大差距。另一方面,在特定异常检测任务中,为达到更高准确率,需手动标注少量异常样本。然而这种性能提升是以大量标注工作为代价的,在许多实际场景中难以实现。本研究在统一框架中解决了上述两个问题。首先,受基于补丁匹配的异常检测算法启发,我们在由新型位置约束补丁匹配生成的残差上训练滑动视觉Transformer。其次,将传统像素级分割问题转化为块级分类问题,使滑动Transformer能在大幅减少标注工作量的同时获得更高准确率。第三,为进一步降低标注成本,我们提出仅使用边界框标注异常区域。通过采用高度定制的半监督学习方案,并配备两种新颖的数据增强方法,有效利用了弱标注引起的未标注区域。所提方法在无监督和监督场景中均在所有评估指标上超越现有最先进方法。在流行MVTec-AD数据集上,我们的SemiREST算法在无监督条件下平均精确率(AP)达81.2%,监督异常检测达84.4% AP。值得关注的是,基于边界框的半监督方案下,SemiREST在MVTec-AD上仍以83.8% AP超越全监督的SOTA方法。