跳到主要内容

Classifier vs. Segmenter

时间:3 分钟(阅读)

这是在创建配方时最常见的问题。下面给出一个清晰的框架。

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

比较

方面ClassifierSegmenter
它能告诉你什么分类(pass/fail 等)缺陷的像素级定位
标注工作量低:每张图像选择一个类别高:标注缺陷像素
所需数据每个类别起步 3-5 张图像类似,但标注耗时更长
ROI 大小适用于小 ROI 时效果最佳更适合处理较大 ROI
速度经过优化时同样快速
最适合存在/不存在、类别决策划痕、污渍、测量、像素级检测
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.

重叠区域

确实存在重叠。许多检测可以使用任一方法。如果您不确定:

  1. 从分类器开始。 设置更简单,标注更快
  2. 如果发现分类器不够精确(在大面积区域内无法检测到微小缺陷,或需要进行测量),请切换到 segmenter(分割器)
  3. 请向 AI 助手在 tools.overview.ai 提问。描述您的应用场景,它将推荐最佳方法

OV20i 与 OV80i

  • OV20i: 每个配方仅可选择一种:分类器或 segmenter(分割器)
  • OV80i: 支持多模型。在同一个配方中将两者结合,以用于同一次拍摄