Skip to main content
QUICK REVIEW

[Paper Review] MuSc: Zero-Shot Industrial Anomaly Classification and Segmentation with Mutual Scoring of the Unlabeled Images

Xurui Li, Ziming Huang|arXiv (Cornell University)|Jan 30, 2024
Anomaly Detection Techniques and ApplicationsComputer Science6 citations
TL;DR

MuSc performs zero-shot anomaly classification and segmentation using mutual scoring among unlabeled test images, avoiding training data or prompts, and achieves state-of-the-art zero-shot results on MVTec AD and VisA.

ABSTRACT

This paper studies zero-shot anomaly classification (AC) and segmentation (AS) in industrial vision. We reveal that the abundant normal and abnormal cues implicit in unlabeled test images can be exploited for anomaly determination, which is ignored by prior methods. Our key observation is that for the industrial product images, the normal image patches could find a relatively large number of similar patches in other unlabeled images, while the abnormal ones only have a few similar patches. We leverage such a discriminative characteristic to design a novel zero-shot AC/AS method by Mutual Scoring (MuSc) of the unlabeled images, which does not need any training or prompts. Specifically, we perform Local Neighborhood Aggregation with Multiple Degrees (LNAMD) to obtain the patch features that are capable of representing anomalies in varying sizes. Then we propose the Mutual Scoring Mechanism (MSM) to leverage the unlabeled test images to assign the anomaly score to each other. Furthermore, we present an optimization approach named Re-scoring with Constrained Image-level Neighborhood (RsCIN) for image-level anomaly classification to suppress the false positives caused by noises in normal images. The superior performance on the challenging MVTec AD and VisA datasets demonstrates the effectiveness of our approach. Compared with the state-of-the-art zero-shot approaches, MuSc achieves a $ extbf{21.1%}$ PRO absolute gain (from 72.7% to 93.8%) on MVTec AD, a $ extbf{19.4%}$ pixel-AP gain and a $ extbf{14.7%}$ pixel-AUROC gain on VisA. In addition, our zero-shot approach outperforms most of the few-shot approaches and is comparable to some one-class methods. Code is available at https://github.com/xrli-U/MuSc.

Motivation & Objective

  • Motivate zero-shot AC/AS by leveraging abundant cues in unlabeled test images.
  • Develop patch-level representations capable of detecting anomalies across varying sizes.
  • Introduce a mutual scoring mechanism to assign anomaly scores using unlabeled images alone.
  • Optimize image-level anomaly classification to reduce false positives from normal image noise.

Proposed method

  • Use Local Neighborhood Aggregation with Multiple Degrees (LNAMD) to encode patch tokens at multiple scales.
  • Apply Mutual Scoring Mechanism (MSM) where unlabeled images score each other's patches to infer anomaly likelihood.
  • Compute patch-level anomaly scores by averaging over multiple ViT stages and aggregation degrees.
  • Introduce Re-scoring with Constrained Image-level Neighborhood (RsCIN) to refine image-level anomaly classification using a neighborhood graph.
  • Optionally employ a Multi-window Mask Operation (MMO) to limit influence to local neighborhoods when refining image-level scores.
  • Use ViT-L/14-336 pretrained backbone and aggregate patch-level features before segmentation and classification.

Experimental results

Research questions

  • RQ1Can unlabeled test images provide sufficient cues to distinguish normal vs. abnormal patches in zero-shot AC/AS?
  • RQ2Does aggregating patch features at multiple neighborhood degrees improve detection of anomalies across different sizes?
  • RQ3Can a mutual scoring scheme leveraging unlabeled data yield reliable pixel-level segmentation without any labeled training data?
  • RQ4Does image-level re-scoring with constrained neighborhoods improve overall anomaly classification performance?
  • RQ5How does MuSc compare to existing zero-shot and few-shot methods on standard industrial anomaly datasets?

Key findings

  • MuSc achieves 97.8 AUROC and 97.5 F1-max for AC and 97.3 AP for AS on MVTec AD in a zero-shot setting, surpassing several zero-shot baselines.
  • MuSc attains 98.8 AUROC and 92.7 AP for AS on VisA in zero-shot, outperforming most zero-shot competitors.
  • For anomaly segmentation, MuSc improves PRO by 21.1 percentage points and AP by 21.9 percentage points over the second-best zero-shot method on MVTec AD.
  • MuSc outperforms many few-shot methods (e.g., 4-shot) on comparable tasks and is competitive with some full-shot methods.
  • Ablation studies show that using multiple aggregation degrees (r in {1,3,5}) and the MSM with minimum-percent sampling yields best AC/AS performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.