Learning Feature Inversion for Multi-class Anomaly Detection under
  General-purpose COCO-AD Benchmark
Jiangning Zhang Chengjie Wang Xiangtai Li Guanzhong Tian Zhucun Xue Yong Liu Guansong Pang Dacheng Tao
Anomaly detection (AD) is often focused on detecting anomaly areas for
industrial quality inspection and medical lesion examination. However, due to
the specific scenario targets, the data scale for AD is relatively small, and
evaluation metrics are still deficient compared to classic vision tasks, such
as object detection and semantic segmentation. To fill these gaps, this work
first constructs a large-scale and general-purpose COCO-AD dataset by extending
COCO to the AD field. This enables fair evaluation and sustainable development
for different methods on this challenging benchmark. Moreover, current metrics
such as AU-ROC have nearly reached saturation on simple datasets, which
prevents a comprehensive evaluation of different methods. Inspired by the
metrics in the segmentation field, we further propose several more practical
threshold-dependent AD-specific metrics, ie, m$F_1$$^{.2}_{.8}$,
mAcc$^{.2}_{.8}$, mIoU$^{.2}_{.8}$, and mIoU-max. Motivated by GAN inversion's
high-quality reconstruction capability, we propose a simple but more powerful
InvAD framework to achieve high-quality feature reconstruction. Our method
improves the effectiveness of reconstruction-based methods on popular MVTec AD,
VisA, and our newly proposed COCO-AD datasets under a multi-class unsupervised
setting, where only a single detection model is trained to detect anomalies
from different classes. Extensive ablation experiments have demonstrated the
effectiveness of each component of our InvAD. Full codes and models are
available at https://github.com/zhangzjn/ader.