Playground
Beat the detector
Real defects, from two datasets the field actually benchmarks on. One region of each sample is defective. Neither you nor the detector is told which. Click where you think it is.
After you click: the blue outline is the dataset’s own ground truth, the crimson box is the detector’s pick, and the heatmap is its anomaly score everywhere. On a wafer the outline is the labelled failure pattern — the largest connected group of failing dies — not every stray die on the map.
Textures are from MVTec AD — Bergmann, Fauser, Sattlegger and Steger, A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection, CVPR 2019 — used here under CC BY-NC-SA 4.0, downscaled for the web, non-commercially, and shared under the same license. Wafer maps are from WM-811K (Wu, Jang and Chen, IEEE Transactions on Semiconductor Manufacturing, 2015). Ground truth is the datasets’ own, not mine.
Dataset
Result
Scoreboard
Under the hood
What is actually running
No training set, no labels, and no knowledge of where the defect is. The detector sees one sample at a time and runs all of this from scratch, in your browser, on every one:
- Reduce the sample to a small grayscale grid and cut it into overlapping square patches — a few hundred of them.
- Take the per-dimension median across every patch. That is a crude picture of what “normal” means for this particular sample.
- Discard the 12% of patches furthest from that median. Some of them are the defect; most are just texture. Either way, what survives is presumed clean.
- Keep the survivors as a memory bank, subsampled if there are a lot of them. The result panel reports the exact size each round.
- Score every patch by the distance to its nearest bank entry, skipping bank entries that overlap it. A patch that resembles nothing else on the sample scores high.
- The highest-scoring patch is the answer. The heatmap is that score everywhere, painted with the inferno colormap.
How well it does, measured
I ran this offline against the shipped samples before publishing it, scoring a hit when the top patch lands on the ground truth. It gets 76% on the 25 MVTec textures and 89% on the 54 wafer maps. Those are the numbers to beat, and the scoreboard recomputes them live as you play.
The wafer failures are not random. The detector refuses to judge any patch that hangs off the edge of the wafer, so an edge ring — yield loss in a band around the rim — is the one pattern it reliably walks past. Its blind spot is a direct consequence of a rule that is otherwise correct.
Why it is this small
This is a deliberately small stand-in for memory-bank methods such as PatchCore. It has no learned features at all — its entire representation is raw pixel values — so it does well when “normal” repeats and badly when the defect is a change in meaning rather than in statistics. That is also why only the five texture categories of MVTec AD are here: point the same detector at the object categories, where normality is one global structure rather than a repeating pattern, and it flags every edge in the frame.
Closing that gap is roughly what I work on. CDGP learns segmentation from labels that are not pixel-level, and SPARC handles the case where the reference set no longer matches what the camera is seeing.
Is the race fair?
Not really, and it is worth being precise about why. Your clock starts when the sample appears and stops when you click, so it measures looking. The detector’s clock measures arithmetic on an array already in memory. Reading the scoreboard as human seconds against machine milliseconds is the wrong comparison. The column worth watching is the left one.