Unlike defects with a repeatable character (like a specific missing component), contamination is by definition irregular — dust, a fibre, a chip, a stain. Here the model learns the pattern of a "clean", correct surface and detects deviation from it, rather than recognising one specific, known defect shape.
This approach works well where the product surface is uniform enough for the deviation to stand out against the background. Where the material texture itself is naturally variable, the line between "normal variation" and "contamination" needs a clearly agreed threshold — and that is exactly what we set before the pilot.
The size of contamination that can be detected depends directly on camera resolution and field of view relative to product size — so assessing camera and optics is the first qualification step here.