Find defects it has never seen.
The model was fitted on photos of good parts only. It flags any patch of an image that looks unlike every patch it has seen before. A from-scratch reimplementation of PatchCore (CVPR 2022), exported to ONNX and running here on your own device. Your image never leaves the browser.
No example images here: MVTec AD is CC BY-NC-SA 4.0, so its photos are not redistributed. Download test images from the MVTec AD page (bottle, metal nut or grid) and upload one above.
One model per product: each was fitted on that product's good parts. A photo of something else will (correctly) look anomalous everywhere.
Describe every patch
A WideResNet-50 pretrained on ImageNet turns each image into 28 × 28 patch descriptors (mid-level layers 2 + 3, averaged over a 3 × 3 neighborhood).
Remember the good ones
Descriptors from defect-free training images go into a memory bank, shrunk to 10 % by greedy coreset sampling so it still covers every normal pattern.
Score by distance
Each test patch is scored by its distance to the nearest remembered patch. The image score is the worst patch; the threshold maximizes F1 on the MVTec test set.