L7LINE-07 Visual QC
Try the demo
Winning entry

First place of 10 teams

Imperial College London · AI & Autonomous Industrial Systems Summer Programme

Five of us built this in a project sprint and it was judged the best of ten teams: two anomaly detectors, trained on good bottles only, that between them caught 62 of 63 unseen defects.

20–31 July 2026 · London · Course lead: Mehmet Mercangöz

Two models · trained on good bottles only

Every broken
bottle caught.

Two very different machines learned what a good bottle looks like: a classic pattern-matcher (PCA) and a small neural network. Neither ever saw a defect during training. Then 63 defects walked in.

▶ Beat the models See the head-to-head
0defects caught · neural net
0defects caught · PCA
0per bottle

The project in 60 seconds

What this is

On a real production line you have thousands of photos of good parts and almost none of defects, so you can't train a normal classifier. Instead, both of our models learn to rebuild good bottles, then flag anything they can't rebuild well. A defect is, by definition, something the model has never seen, so its rebuild comes out wrong, and the size of that error is the alarm signal.

We built the two contenders independently within the team, then judged them on the exact same final exam: 126 unseen photos, half good, half defective, from the MVTec AD benchmark. The neural net caught 62 of 63 defects; the PCA caught 60. Every number and figure on this site is the actual output of the two project notebooks.

Example normal and defective bottle images
The cast: good bottles and the three defect types (large break, small break, contamination). tap to zoom
Explore the site

Pick a door

01 · Interactive Beat the models Five real test-set bottles, drawn with the same odds as the real line. Call each one OK or defect against the clock, then see your precision, recall and F1 next to the model's. Play → 02 · The contenders Data & the two models The dataset and the honest train/validation/test split, the PCA pattern-matcher, the patch autoencoder, and the five vision filters it sees the world through. Meet them → 03 · The verdict Head-to-head results The full scorecard, the heatmaps showing exactly which pixels raised each alarm, the PCA components dial, and the harder transistor product that took three tries. See who won → 04 · Honest assessment Limits & the team What both models still miss, the simpler ideas we tried and dropped, and the five people who built this in a week. Read the fine print →
The scoreboard

The result, in one table

Neural netPCA
defects caught62 / 63 (98.4%)60 / 63 (95.2%)
good bottles wrongly flagged4 / 63 (6.3%)6 / 63 (9.5%)
breaks caught42 / 42 (all)41 / 42
what it missed1 contamination2 contamination + 1 small break

They're much closer than we expected. The neural net edges it, but a well-built PCA gets within a whisker using nothing but classic linear algebra. The full head-to-head →


← Limits & the team Start here: beat the models →
Zoomed figure