Skip to main content
QUICK REVIEW

[Paper Review] Zero-Shot Anomaly Detection with Pre-trained Segmentation Models

Matthew Baugh, James Batten|arXiv (Cornell University)|Jun 15, 2023
Anomaly Detection Techniques and ApplicationsComputer Science4 citations
TL;DR

This paper proposes a zero-shot anomaly detection method that enhances WinCLIP by integrating zero-shot segmentation models for improved localization. By combining foreground instance segmentation with CLIP-based prompting and multi-level prediction aggregation, the approach achieves state-of-the-art performance with an 81.5 F1-max score at the sample level and 24.2 at the pixel level on the VisA dataset, ranking third in the VAND 2023 challenge.

ABSTRACT

This technical report outlines our submission to the zero-shot track of the Visual Anomaly and Novelty Detection (VAND) 2023 Challenge. Building on the performance of the WINCLIP framework, we aim to enhance the system's localization capabilities by integrating zero-shot segmentation models. In addition, we perform foreground instance segmentation which enables the model to focus on the relevant parts of the image, thus allowing the models to better identify small or subtle deviations. Our pipeline requires no external data or information, allowing for it to be directly applied to new datasets. Our team (Variance Vigilance Vanguard) ranked third in the zero-shot track of the VAND challenge, and achieve an average F1-max score of 81.5/24.2 at a sample/pixel level on the VisA dataset.

Motivation & Objective

  • To address the challenge of data-inefficient anomaly detection in industrial settings where only a few normal samples are available.
  • To improve localization accuracy of zero-shot anomaly detection models by leveraging pre-trained segmentation models.
  • To develop a pipeline that requires no external data or fine-tuning, enabling direct application to new datasets.
  • To achieve state-of-the-art performance on the VisA dataset in the zero-shot track of the VAND 2023 Challenge.

Proposed method

  • Foreground extraction is performed by combining dichotomous image segmentation with Segment Anything Model (SAM), filtering SAM outputs using a 80% overlap threshold to isolate the true foreground.
  • Image tiling divides each foreground instance into square tiles of at least 352×352 pixels, with adaptive tiling along long axes for high-aspect-ratio objects to preserve object components.
  • A compositional prompt ensemble is used for sample-level classification, with separate generic noun prompts for localizing anomalies at the pixel level.
  • Tile-level anomaly scores are computed by averaging cosine similarities between CLIP embeddings of prompts and each tile’s image embedding, avoiding cluster averaging issues for anomalous prompts.
  • Pixel-level predictions are generated using CLIPSeg with localizing prompts, and a harmonic mean is applied across prompt segmentations to emphasize consistent activations.
  • Prediction aggregation combines tile-level scores to scale pixel-level predictions, with final image-space predictions formed by averaging overlapping tile outputs and top-25% foreground component scores used for sample-level classification.

Experimental results

Research questions

  • RQ1Can zero-shot segmentation models improve localization performance in zero-shot anomaly detection without requiring additional training data?
  • RQ2How does foreground instance segmentation enhance detection of small or subtle anomalies in industrial images?
  • RQ3To what extent can CLIP-based prompting with generic anomaly descriptors outperform standard WinCLIP prompts in pixel-level anomaly localization?
  • RQ4How does multi-level prediction aggregation (tile-level and pixel-level) improve overall detection robustness and accuracy?
  • RQ5Can a fully zero-shot pipeline achieve state-of-the-art performance on VisA without any dataset-specific adaptation?

Key findings

  • The method achieved an 81.5 F1-max score at the sample level on the VisA dataset, surpassing the WinCLIP baseline of 79.0 and ranking third in the VAND 2023 zero-shot track.
  • At the pixel level, the method achieved a 24.2 F1-max score, significantly outperforming the WinCLIP baseline of 14.8 and the challenge winner APRIL-GAN’s 32.3.
  • The integration of foreground segmentation reduced false positives from background shadows and improved focus on object instances, especially for complex or elongated shapes.
  • Using harmonic averaging across CLIPSeg prompt outputs improved consistency in pixel-level segmentation, particularly for subtle anomalies.
  • The use of generic localizing prompts (e.g., 'defect', 'damage') led to more precise anomaly localization than reusing full-image WinCLIP prompts.
  • Prediction aggregation using top-25% foreground component scores effectively mitigated noise from normal regions and improved sample-level classification robustness.

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.