Panoptic segmentation

Panoptic segmentation assigns every pixel of an image both a class and, for countable objects, an instance ID, uniting semantic segmentation of amorphous regions ("stuff" such as road or sky) with instance segmentation of objects ("things" such as cars or people).

Tasks and training

Things and stuff

The task was defined in the paper Panoptic Segmentation by Kirillov and co-authors. Its rule is strict: every pixel gets exactly one label, and no two segments overlap. Stuff classes have one segment per image, things have one per object. A street scene thus becomes road, sidewalk and sky regions plus car 1, car 2 and person 1.

Panoptic quality

The same paper introduced panoptic quality (PQ). A predicted segment matches a true one of the same class when their IoU is above 0.5, which makes every match unique.

PQ = Σ IoU(p, g) / (|TP| + ½ · |FP| + ½ · |FN|)PQ = SQ × RQ
The sum runs over matched pairs (TP). Segmentation quality SQ is the mean IoU of matched pairs; recognition quality RQ = |TP| / (|TP| + ½ · |FP| + ½ · |FN|), an F1 score over segments.

Example: three matches with IoU 0.9, 0.8 and 0.7, one false positive and one missed segment. PQ = 2.4 / (3 + 0.5 + 0.5) = 0.6; SQ = 0.8 and RQ = 3 / 4 = 0.75, and 0.8 × 0.75 = 0.6.

Labeling pitfalls

  • Gaps and overlaps between neighbouring segments. In panoptic data they are errors, not noise.
  • Deciding late which classes are things. A parked row of bicycles labeled as one region cannot later be counted.
  • No rule for pixels that fit no class; most datasets keep a void label and ignore it in scoring.

Preparing panoptic labels in Supervisely

There is no separate panoptic shape: stuff becomes one bitmap or polygon per class region and things become one object each. The polygon tools of the image labeling tool make touching objects share one border, and brush strokes can leave existing masks untouched, which keeps segments from overlapping. See also instance segmentation and semantic segmentation.

Frequently asked questions.

What is panoptic segmentation?

A segmentation that labels every pixel and separates individual objects: countable things such as people and cars get one mask each, and amorphous stuff such as sky, road or grass gets a class region.

What is the difference between semantic and panoptic segmentation?

Semantic segmentation gives every pixel a class but merges objects of the same class; panoptic segmentation also tells the individual objects apart.