# Wykrywanie wad uczone tylko na dobrych sztukach

EN: **Unsupervised industrial anomaly detection** · id `unsupdefect` · aliases: unsupervised anomaly detection, industrial anomaly detection, cold-start defect detection, one-class defect detection, nienadzorowane wykrywanie wad, PatchCore

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w przemyśle](https://aiatlasgraph.com/t/industrialai.md) › [Wizyjna kontrola jakości](https://aiatlasgraph.com/t/visualinspection.md) › Wykrywanie wad uczone tylko na dobrych sztukach

## Description

- PL: Wykrywanie i lokalizacja anomalii na obrazach przy uczeniu wyłącznie na próbkach nominalnych, zwykle przez porównanie cech z modelem normalności.
- EN: Detecting and localising image anomalies when training only on nominal samples, usually by comparing features with a model of normality.

## In one sentence

- PL: Program uczy się, jak wygląda poprawny wyrób, i zgłasza wszystko, co od tego odbiega, nawet wadę, której nikt wcześniej nie widział.
- EN: Software learns what a correct product looks like and flags anything that differs, even a defect nobody has seen before.

## Problem it solves

- PL: Na nowej linii wad prawie nie ma, a każda bywa inna, więc nie da się zebrać tysięcy zdjęć wadliwych sztuk do nauki.
- EN: A new line has almost no defects and each one differs, so you cannot collect thousands of photos of faulty parts to learn from.

## What it does

- PL: Jak ochroniarz, który zna twarze wszystkich pracowników: nie musi znać złodziei, wystarczy, że zauważy obcą twarz.
- EN: Like a guard who knows every employee's face: he need not know the thieves, he just has to notice a stranger.

## Everyday example

- PL: Producent śrub fotografuje kilkaset dobrych sztuk i od następnej zmiany kamera zaznacza każdą z wyszczerbionym gwintem albo nietypową plamą.
- EN: A screw maker photographs a few hundred good screws, and from the next shift the camera marks any with a chipped thread or an odd stain.

## This concerns you if you…

- PL: uruchamiasz nową linię bez archiwum zdjęć wad
- PL: wady u ciebie są rzadkie i za każdym razem inne
- EN: are starting a new line without a defect photo archive
- EN: have rare defects that differ every time

## Keywords

PatchCore · PaDiM · MVTec AD · VisA · MVTec LOCO · anomalib · normalizing flows · student-teacher anomaly detection

## How it works

- PL: Wstępnie wytrenowana sieć wizyjna wyciąga cechy łatek obrazu dobrych sztuk; metoda pamięciowa zapisuje reprezentatywny bank tych cech, a nowa łatka dostaje wynik anomalii jako odległość od najbliższego sąsiada w banku. Mapa wyników wskazuje miejsce wady. Alternatywy to rekonstrukcja autoenkoderem, przepływy normalizujące i destylacja nauczyciel–uczeń.
- EN: A pretrained vision network extracts patch features from good parts; a memory-bank method stores a representative set of them, and a new patch's anomaly score is its distance to the nearest neighbour in the bank. The score map shows where the defect is. Alternatives include autoencoder reconstruction, normalizing flows and student–teacher distillation.

## Limits

- PL: Nie każda anomalia jest wadą: zmiana oświetlenia czy dopuszczalna różnica wyglądu też podnosi wynik. Wady logiczne, jak brakujący element, są trudniejsze niż rysy. Wyniki na głównym benchmarku są bliskie maksimum, więc słabo różnicują metody.
- EN: Not every anomaly is a defect: changed lighting or acceptable variation also raises the score. Logical defects, such as a missing component, are harder than scratches. Scores on the main benchmark are near the maximum and barely separate methods.

## Key terms

- PL: **próbka nominalna**: Wyrób bez wad, wzorzec poprawnego wyglądu.
- PL: **bank pamięci**: Zapisany zbiór cech dobrych sztuk do porównań.
- PL: **AUROC**: Miara, jak dobrze wynik oddziela wadliwe sztuki od dobrych.
- EN: **nominal sample**: A defect-free product, the reference for correct appearance.
- EN: **memory bank**: A stored set of good-part features used for comparison.
- EN: **AUROC**: How well a score separates defective parts from good ones.

## Know first

- [Wykrywanie anomalii i nowości (Outlier and novelty detection)](https://aiatlasgraph.com/t/anomalydetection.md)
- [Metoda k najbliższych sąsiadów (k-NN) (k-nearest neighbours)](https://aiatlasgraph.com/t/knn.md)

## Related topics

Untyped, symmetric "see also" links.

- [Wykrywanie anomalii i nowości (Outlier and novelty detection)](https://aiatlasgraph.com/t/anomalydetection.md)

## Sources

- [Towards Total Recall in Industrial Anomaly Detection](<https://arxiv.org/abs/2106.08265>) `roth-patchcore-2021` · by Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, Peter Gehler

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/unsupdefect · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
