Back to discover
NewsBuild with AI

Roboflow adds anomaly detection trained on normal images

The new support targets visual inspection when examples of defects are scarce.

Conceptual illustration of five intact blue ceramic rings and a separate chipped ring beneath an inspection camera, with an amber highlight at the chip.
CurioFuse · AI-generated illustration
In this article

Learn what normal looks like

Roboflow announced anomaly detection support on 28 October, with deployment in the cloud or on your own hardware. An anomaly is an image region that differs from the learned normal appearance. For inspection teams, the starting material is pictures of good products. The company recommends cropping to one object and keeping genuinely normal examples in the training set: a defect labeled normal teaches the wrong baseline.

Keep training and checking separate

The task documentation starts with an Anomaly Detection project, followed by image uploads and normal or anomalous labels. Only normal images train the model. Anomalous examples belong in validation and test sets, where they help set the decision threshold and measure accuracy. Next, generate a dataset version using only automatic orientation and Stretch to resizing, without augmentation (artificially varied training examples), then choose PatchCore or FoundAD for training. After training, deployment options include a serverless API, dedicated deployment or Roboflow Inference on your hardware.

Read the score correctly

The PatchCore API reference distinguishes the raw anomaly score from the threshold saved during training. The score has no fixed range. Its confidence output is not a probability that a defect exists: anomalous confidence is 0.5 at the threshold. A heatmap, a spatial array showing where the image differs, is optional and requires include_anomaly_map=True. It uses the model’s input dimensions; the reference instructs stretching it to the original image dimensions for an overlay.

Sources(3)

Sources & standardsReport a correction