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
| Aspect | Classifier | Segmenter |
|---|---|---|
| What it tells you | Category (pass/fail/etc.) | Exact pixels of the defect |
| Labeling effort | Low: select a class per image | High: paint defect pixels |
| Data needed | 3-5 images per class to start | Similar, but labeling takes longer |
| ROI size | Works best with small ROIs | Handles larger ROIs better |
| Speed | Fast | Equally fast when optimized |
| Best for | Presence/absence, category decisions | Scratches, stains, measurements, pixel-level detection |
Classifiers are faster to set up, need fewer training images, and work well for most pass/fail inspections. You can always switch to a segmenter later if you need pixel-level detail. Starting simple lets you validate your setup quickly.
Segmenters need pixel-level annotation during labeling, which takes significantly longer than selecting a class for a classifier. Budget extra time for the initial setup and labeling compared to classifiers, especially if you have many training images.
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 with a larger ROI if you need to cover a wide 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:
- Start with a classifier. It's simpler to set up and faster to label
- 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
- 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