Skip to main content

PatchCore Industrial Anomaly Detection

State-of-the-art anomaly detection for industrial inspection achieving up to 99.6% AUROC on the MVTec AD benchmark using pretrained feature extractors and coreset subsampling

99.6%
Image-level AUROC
98.4%
Pixel-level AUROC
50+
Backbone networks

Quick start

Get started with PatchCore in minutes

1

Install dependencies

Clone the repository and install required packages:
2

Download MVTec AD dataset

Download the MVTec AD benchmark dataset and organize it with the expected structure:
The dataset should contain 15 subdatasets: bottle, cable, capsule, carpet, grid, hazelnut, leather, metal_nut, pill, screw, tile, toothbrush, transistor, wood, and zipper.
3

Train your first model

Train PatchCore on a single category:
4

Evaluate the model

Load and evaluate your trained model:

Key features

Everything you need for industrial anomaly detection

State-of-the-art accuracy

Achieve up to 99.6% image-level AUROC and 98.4% pixel-level AUROC on MVTec AD

Memory efficient

Coreset subsampling reduces memory footprint while maintaining detection accuracy

50+ backbone networks

Choose from ResNet, WideResNet, EfficientNet, Vision Transformers, and more

Ensemble support

Combine multiple backbones and feature layers for even better performance

FAISS acceleration

GPU-accelerated nearest neighbor search for fast inference

Pretrained models

Ready-to-use models for all 15 MVTec AD categories

Ready to start detecting anomalies?

Get up and running with PatchCore in minutes. Train your first model or explore our pretrained models for the MVTec AD benchmark.