WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation

TL;DR

WinCLIP achieves 91.8% AUROC in zero-shot anomaly classification on MVTec-AD.

cs.CV 🔴 Advanced 2023-03-27 10 views
Jongheon Jeong Yang Zou Taewan Kim Dongqing Zhang Avinash Ravichandran Onkar Dabeer
visual anomaly detection zero-shot learning few-shot learning industrial inspection deep learning

Key Findings

Methodology

WinCLIP employs a compositional ensemble of state words and prompt templates, combined with window-level feature extraction for zero- and few-shot anomaly classification and segmentation. WinCLIP+ leverages complementary information from normal images to enhance few-shot performance.

Key Results

  • WinCLIP achieved 91.8% AUROC in zero-shot anomaly classification and 85.1% in segmentation on MVTec-AD, significantly outperforming existing methods.
  • WinCLIP+ achieved 93.1% (classification) and 95.2% (segmentation) AUROC in 1-shot settings, also excelling on the VisA dataset.
  • Ablation studies confirmed the contributions of compositional prompts and multi-scale feature extraction to performance improvements.

Significance

WinCLIP offers a solution for anomaly detection in industrial inspection without the need for extensive labeled data, particularly valuable for long-tail tasks. It improves detection accuracy while reducing the complexity of model training.

Technical Contribution

WinCLIP introduces innovative window-based feature extraction and compositional prompts, significantly enhancing CLIP's performance in anomaly detection tasks. It is the first to apply language models to anomaly classification and segmentation, expanding the application scope of vision-language models.

Novelty

WinCLIP is the first model to use language guidance for zero-shot anomaly classification and segmentation, achieving innovative performance improvements through multi-scale feature extraction and language alignment.

Limitations

  • WinCLIP may struggle with extremely complex anomaly types, especially those difficult to describe in language.
  • The method's reliance on prompt engineering may limit its generalization across different tasks.

Future Work

Future research directions include optimizing prompt engineering to improve model generalization and exploring WinCLIP's potential applications in other visual tasks.

AI Executive Summary

Visual anomaly detection in industrial inspection has long been a challenge, with traditional methods relying on large amounts of task-specific images and annotations, making them hard to scale. WinCLIP introduces a solution by leveraging the CLIP language model, combined with window-level feature extraction and compositional prompts, to perform anomaly detection without extensive labeled data.

Experiments on MVTec-AD and VisA datasets show that WinCLIP significantly outperforms existing methods in both zero-shot and few-shot settings. Notably, in 1-shot settings, WinCLIP+ achieves over 95% AUROC in both classification and segmentation tasks.

While WinCLIP achieves breakthroughs in performance, its reliance on prompt engineering and performance on extremely complex anomalies remain areas for improvement. Future research could further optimize prompt engineering and explore its applications in other visual tasks.

Deep Analysis

Background

Visual anomaly detection is crucial in industrial inspection, with traditional methods typically relying on large labeled datasets for training. Recently, vision-language models like CLIP have shown potential in zero- and few-shot tasks, but have underperformed in anomaly detection.

Core Problem

Anomaly detection in industrial inspection faces challenges of sample scarcity and task diversity. Traditional methods struggle to scale across long-tail tasks and require extensive labeled data.

Innovation

WinCLIP introduces the CLIP language model, combined with window-level feature extraction and compositional prompts, for zero- and few-shot anomaly detection. Its innovation lies in using language guidance for anomaly classification and segmentation.

Methodology

  • �� Use CLIP model for language-guided anomaly detection.
  • �� Introduce window-level feature extraction to capture multi-scale information.
  • �� Employ compositional state words and prompt templates to enhance classification accuracy.
  • �� WinCLIP+ leverages complementary information from normal images to enhance few-shot performance.

Experiments

Experiments were conducted on MVTec-AD and VisA datasets, comparing WinCLIP's performance with existing methods. Metrics such as AUROC and AUPR were used for evaluation, and ablation studies were conducted to verify the contributions of each component.

Results

WinCLIP achieved 91.8% AUROC in zero-shot classification and 85.1% in segmentation on MVTec-AD. In 1-shot settings, WinCLIP+ achieved 93.1% (classification) and 95.2% (segmentation) AUROC.

Applications

WinCLIP can be applied to various industrial inspection tasks, especially in scenarios with limited samples. Its ability to function without extensive labeled data makes it valuable for long-tail tasks.

Limitations & Outlook

WinCLIP may struggle with extremely complex anomaly types and its reliance on prompt engineering may limit its generalization. Future research could optimize prompt engineering and explore applications in other visual tasks.

Plain Language Accessible to non-experts

Imagine you work in a large factory, needing to check products for defects. Traditional methods require lots of samples to train machines to recognize defects, which is time-consuming. WinCLIP acts like a smart assistant, using a combination of language and image methods to identify anomalies with minimal samples. It analyzes different parts of a product, like using a magnifying glass to inspect every detail, then combines language descriptions to determine if there's an issue. This way, even rare defects can be quickly identified.

ELI14 Explained like you're 14

Imagine you're playing a spot-the-difference game, and WinCLIP is your super helper. It can not only see images but also understand text descriptions. For example, you have a normal circuit board photo and one that might have a problem. WinCLIP acts like a super detective, comparing and understanding descriptions to quickly find what's wrong. It doesn't need many examples to learn these tricks, just like you get better at games the more you play!

Glossary

WinCLIP

A method combining vision and language models for anomaly detection, particularly suited for zero- and few-shot scenarios.

Used for anomaly classification and segmentation in industrial inspection tasks.

CLIP

A large-scale pre-trained vision-language model capable of performing zero-shot image classification.

Serves as the base model for WinCLIP, used in anomaly detection.

AUROC

Area Under the Receiver Operating Characteristic curve, used to evaluate the performance of classification models.

Used to measure WinCLIP's performance in anomaly detection tasks.

MVTec-AD

A benchmark dataset for evaluating anomaly detection algorithms, containing images of various industrial products.

WinCLIP's performance was tested on this dataset.

Few-shot learning

A technique for training models and making predictions with only a small amount of training data.

WinCLIP+ performs exceptionally well in few-shot conditions.

Open Questions Unanswered questions from this research

  • 1 How to improve WinCLIP's generalization without relying on prompt engineering?
  • 2 Can WinCLIP be applied to other visual tasks like object detection?

Applications

Immediate Applications

Industrial Inspection

WinCLIP can be used to automate defect detection on production lines, reducing the time and cost of manual inspections.

Long-term Vision

Smart Manufacturing

With further optimization, WinCLIP could enable comprehensive automated quality control in future smart manufacturing systems.

Abstract

Visual anomaly classification and segmentation are vital for automating industrial quality inspection. The focus of prior research in the field has been on training custom models for each quality inspection task, which requires task-specific images and annotation. In this paper we move away from this regime, addressing zero-shot and few-normal-shot anomaly classification and segmentation. Recently CLIP, a vision-language model, has shown revolutionary generality with competitive zero-/few-shot performance in comparison to full-supervision. But CLIP falls short on anomaly classification and segmentation tasks. Hence, we propose window-based CLIP (WinCLIP) with (1) a compositional ensemble on state words and prompt templates and (2) efficient extraction and aggregation of window/patch/image-level features aligned with text. We also propose its few-normal-shot extension WinCLIP+, which uses complementary information from normal images. In MVTec-AD (and VisA), without further tuning, WinCLIP achieves 91.8%/85.1% (78.1%/79.6%) AUROC in zero-shot anomaly classification and segmentation while WinCLIP+ does 93.1%/95.2% (83.8%/96.4%) in 1-normal-shot, surpassing state-of-the-art by large margins.

cs.CV cs.AI cs.CL