INP-Former  by luow23

Novel approach for universal anomaly detection using intrinsic image properties

Created 10 months ago
253 stars

Top 99.4% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

INP-Former addresses limitations in traditional anomaly detection (AD) by extracting intrinsic normal prototypes directly from test images, rather than relying on external training set references. This novel approach offers improved accuracy and versatility for industrial inspection and universal AD tasks, with potential for zero-shot capabilities. It is targeted at researchers and practitioners seeking robust anomaly detection solutions.

How It Works

The core innovation lies in the INP Extractor, which linearly combines normal tokens from a test image to form Intrinsic Normal Prototypes (INPs). These INPs guide a decoder to reconstruct only normal image components, with reconstruction errors highlighting anomalies. This method is further enhanced by an INP Coherence Loss to ensure INP fidelity and a Soft Mining Loss to focus training on challenging samples. This intrinsic approach mitigates issues arising from appearance and positional variations common in external-reference methods.

Quick Start & Requirements

  • Installation: Create a conda environment (python=3.8.12), activate it, and install dependencies via pip install -r requirements.txt. Optional packages include gradio and specific onnx versions for ONNX export.
  • Hardware: Recommended: NVIDIA GeForce RTX 4090 (24GB) or equivalent GPU with matching package versions.
  • Datasets: Requires downloading MVTec AD, VisA, and Real-IAD datasets and placing them in specified directory structures (e.g., ../mvtec_anomaly_detection). VisA requires an additional preprocessing step.
  • **Links
Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
3
Star History
14 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.