
PaDiM anomaly detector: takes an Image and emits {score: Double, heatmap: Image} — an image-level anomaly score plus a per-pixel heatmap Image. Use when a class-specific feature distribution is fitted ahead of time and per-pixel localisation is needed.
Live visual QA: each frame's anomaly heatmap is drawn back over the part for an operator to watch defects light up in real time.
Automated reject gate: the anomaly score is thresholded by an expression stage and only offending parts are reported as JSON to a line controller.
model_path and device are fixed at startup; swapping the checkpoint or backend requires a redeploy.Image short-circuits to a zero score and a 1x1 black heatmap without running the network.Automated release