Member-only story
PatchCore: Why It Compares Embedding Vectors Instead of Raw Pixels
Introduction
Machine Learning systems designed for anomaly detection attempt to identify whether an image contains patterns that deviate from normal examples. In industrial inspection tasks, these anomalies may include:
- scratches
- dents
- cracks
- contamination
- structural irregularities
- texture defects
Traditional image comparison approaches relied heavily on raw pixel analysis. However, modern anomaly detection approaches such as PatchCore operate differently. Instead of comparing images directly at the pixel level, PatchCore compares high-dimensional embedding vectors extracted from local image patches.
This design choice is central to the effectiveness of the model.
The reason is that raw pixels contain low-level intensity information but very little semantic understanding of visual structure. Embedding vectors, by contrast, encode higher-level representations involving texture, edges, spatial organization, and material consistency.
PatchCore performs comparison in feature space rather than image space.








