Skip to main content

Classifier vs. Segmenter

Time: 3 minutes (reading)

This is the most common question when creating a recipe. Here's a clear framework.

Classifier

A classifier looks at each ROI crop and assigns it to a category: pass, fail, present, absent, scratched, good, or whatever classes you define.

Think of it like sorting cards into piles. The AI looks at the whole crop and says "this goes in the pass pile" or "this goes in the fail pile."

Use a classifier when:

  • You need pass/fail or multi-class decisions
  • Your ROIs are small enough to clearly show the defect
  • Labeling speed matters (classifiers are much faster to label)
  • You're checking for presence/absence of a feature
  • Examples: screw present/absent, connector seated/unseated, label correct/wrong

Segmenter

A segmenter examines each ROI crop at the pixel level and identifies exactly which pixels belong to a defect.

Think of it like highlighting with a marker. The AI circles exactly where the defect is, not just whether one exists.

Use a segmenter when:

  • You need pixel-level defect localization (where exactly is the scratch?)
  • You need to measure defect size or area
  • Your ROIs need to be large but you're looking for small defects
  • You need to count multiple defects in one region
  • Examples: surface scratches, stains, cracks, weld quality, dimensional measurements

Comparison

AspectClassifierSegmenter
What it tells youCategory (pass/fail/etc.)Exact pixels of the defect
Labeling effortLow: select a class per imageHigh: paint defect pixels
Data needed3-5 images per class to startSimilar, but labeling takes longer
ROI sizeWorks best with small ROIsHandles larger ROIs better
SpeedFastEqually fast when optimized
Best forPresence/absence, category decisionsScratches, stains, measurements, pixel-level detection
When in doubt, start with a classifier

Classifiers are faster to set up, need fewer training images, and work well for most pass/fail inspections. Switch to a segmenter only if you need pixel-level detail, defect measurement, or need to detect small defects within a large inspection area.

Segmenters require more setup time

Segmenters require pixel-level annotation during labeling, which takes significantly longer than classifier labeling. Budget extra time for the initial setup compared to classifiers. If you have many regions to label, the time investment adds up quickly.

The 512x512 pixel processing limit

Both classifiers and segmenters process ROI crops at a maximum resolution of 512x512 pixels. Any ROI larger than this gets downscaled before the AI processes it, which means small defects may become invisible. Keep your ROIs as small as possible to preserve detail, or use a segmenter if you need to cover a larger area while still detecting fine defects.

The overlap zone

There's genuine overlap. Many inspections could work with either approach. If you're not sure:

  1. Start with a classifier. It's simpler to set up and faster to label
  2. If you find the classifier isn't precise enough (can't detect small defects in large areas, or you need measurement), switch to a segmenter
  3. Ask the AI Assistant at tools.overview.ai. Describe your application and it will recommend the best approach

OV20i vs OV80i

  • OV20i: Choose one per recipe, either a classifier or a segmenter
  • OV80i: Multi-model support. Combine both in a single recipe for the same capture