Segmentation Fundamentals

Table of contents

  1. ▪ Segmentation Tasks
  2. ▪ Prompts and Masks
  3. ▪ Evaluating Overlap
  4. ▪ References

▪ Segmentation Tasks

  • Semantic segmentation: assign a class to each pixel, without separating objects of the same class.
  • Instance segmentation: produce a separate mask for each object instance.
  • Panoptic segmentation: combine semantic classes with instance identities for countable objects, while also labeling regions such as roads or sky.

▪ Prompts and Masks

A binary mask indicates which pixels belong to a selected region. Promptable segmentation uses inputs such as points or boxes to specify that region; a mask alone need not include a class label. SAM 2 and SAM 3 provide examples of different prompting interfaces.

▪ Evaluating Overlap

For predicted foreground pixels \(A\) and reference pixels \(B\), two common measures are

\[\operatorname{IoU}=\frac{|A\cap B|}{|A\cup B|}, \qquad \operatorname{Dice}=\frac{2|A\cap B|}{|A|+|B|}.\]

Both reach one for identical nonempty masks. Inspect boundaries and missed objects alongside aggregate scores; averaging can hide errors on small targets. Evaluation should also specify how empty masks are handled.

▪ References


This site uses Just the Docs, a documentation theme for Jekyll.