What is instance segmentation?

Instance segmentation is the computer vision task of finding each object in an image separately and marking its pixels with its own mask. Each mask carries a class label; two vehicles of the same class count as two instances.

Unlike semantic segmentation, which assigns every pixel to a class without separating objects of the same class, it tells each object apart.

Topic
Machine learning, models and training
Also known as
Object instance segmentation, instance-level segmentation
Origin
2014, Simultaneous Detection and Segmentation (SDS); 2017, Mask R-CNN

How instance segmentation works

  1. The model first finds candidate objects and predicts a class and a bounding box for each.
  2. Mask R-CNN adds a third branch that outputs a mask for each object, in parallel with the box branch.
  3. The classification branch picks the class; the mask branch predicts only a binary mask of the object's pixels.
  4. The RoIAlign layer aligns masks at pixel level and improved mask accuracy by a relative 10% to 50%.

In more detail

Countable objects and amorphous regions

Segmentation research separates countable objects from amorphous regions of similar texture or material such as grass, sky or road. Countable objects are usually handled by object detection or instance segmentation, amorphous regions by semantic segmentation.

Commonly confused terms

TermHow it differs
Object detectionObject detection classifies each object and locates it with a rectangular box. Instance segmentation produces not just a box but a mask showing the object's pixels, so it also gives the object's shape and area.

Why instance segmentation matters for on-premises AI

The task requires detecting every object while precisely segmenting each one, so it gives richer information than an object detection box for counting, measuring and separating overlapping objects. The COCO dataset, with 2.5 million labelled instances in 328k images, pushed the field towards this task. Introduced in 2017, Mask R-CNN ran at 5 frames per second and showed top results in all three COCO challenge tracks.

ON-PREMISES EXAMPLE

A logistics warehouse separates every parcel with its own mask in conveyor camera images. Overlapping parcels are counted separately; damage is measured by comparing the mask of dented areas with the parcel mask and suspect parcels go to an operator.

Common questions

What training data does instance segmentation need?

Images in which every object is labelled with its own pixel-level mask. Datasets such as COCO are labelled this way. Such data labelling takes real effort; COCO itself drew on extensive crowd worker involvement.

Which models perform instance segmentation?

A common baseline is Mask R-CNN, which adds a mask branch to an object detector. It runs on a backbone network such as Residual Network; the COCO test results shown in its paper are based on ResNet-101.

What is panoptic segmentation?

Panoptic segmentation unifies semantic and instance segmentation in a single task: every pixel gets both a class and an instance id. Uncountable regions such as sky or road and individual objects thus appear in one output.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.