Efficient Anomaly Detection with Budget Annotation Using Semi-Supervised Residual Transformer

6 Jun 2023  ·  Hanxi Li, Jingqi Wu, Hao Chen, Mingwen Wang, Chunhua Shen ·

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.

PDF Abstract

Results from the Paper


 Ranked #1 on Anomaly Detection on MVTec AD (Segmentation AUROC metric)

     Get a GitHub badge
Task Dataset Model Metric Name Metric Value Global Rank Uses Extra
Training Data
Result Benchmark
Anomaly Detection BTAD SemiREST-Un Segmentation AUROC 97.9 # 3
Segmentation AUPRO 81.4 # 3
Segmentation AP 55.5 # 2
Unsupervised Anomaly Detection KolektorSDD2 SemiREST-Un Segmentation AUROC 99.4 # 1
Segmentation AUPRO 98.1 # 1
Segmentation AP 72.8 # 1
Anomaly Detection MVTec AD SemiREST-Un Segmentation AUROC 99.3 # 1
Segmentation AUPRO 97.5 # 3
Segmentation AP 81.2 # 3
Supervised Anomaly Detection MVTec AD SemiREST-Sup Segmentation AUROC 99.5 # 2
Segmentation AUPRO 98.2 # 2
Segmentation AP 84.4 # 2

Methods