What is image segmentation?

Image segmentation is the computer vision task of dividing an image into meaningful regions or objects, usually by assigning each pixel to a class or object. Pixel class labelling is semantic segmentation; separating each object is instance segmentation.

Unlike object detection, which marks an object with a box, segmentation traces its outline at pixel level; it is also harder than image classification, which gives the whole image one label.

Topic
Machine learning, models and training
Also known as
Segmentation
Origin
Classic methods such as thresholding and region growing; in deep learning, fully convolutional networks, 2014

How image segmentation works

  1. The image passes through a convolutional or attention-based backbone that produces feature maps.
  2. Fully convolutional networks map input of any size to output of the same size, predicting a label for every pixel.
  3. Semantic segmentation labels each pixel, instance segmentation outputs a mask per object and panoptic segmentation combines both in one output.
  4. Promptable models take a point, box or text naming what to segment and return a mask.

In more detail

Countable things and amorphous stuff

In computer vision, things are countable objects such as people, animals and tools; stuff is amorphous regions of similar texture or material such as grass, sky and road. Semantic segmentation treats thing classes as stuff and assigns a class to every pixel; instance segmentation outputs a separate mask for each object. Panoptic segmentation unifies the two views and uses a panoptic quality (PQ) metric that measures all classes in a uniform way.

Commonly confused terms

TermHow it differs
Semantic segmentationSemantic segmentation is the type of image segmentation that gives every pixel a class label without separating different objects of the same class. Image segmentation is the name of the general task covering semantic, instance and panoptic types.

Why image segmentation matters for on-premises AI

Segmentation is central to medical image analysis such as extracting tumour boundaries, to autonomous vehicles and to video surveillance. Fully convolutional networks were a milestone, showing that deep networks can be trained end to end for segmentation. The Segment Anything project released a promptable model with a dataset of over 1 billion masks on 11 million images, which makes labelling cheaper for organisations.

ON-PREMISES EXAMPLE

A metropolitan municipality segments buildings, roads, green areas and water in aerial photographs at pixel level; comparing yearly images, it flags new construction and lost green space for planning specialists.

Common questions

What is the difference between image segmentation and object detection?

Object detection gives each object's type and location with a rectangular box. Image segmentation draws the boundary of the object or region at pixel level.

How do semantic, instance and panoptic segmentation differ?

Semantic segmentation gives every pixel a class label but does not separate objects of the same class. Instance segmentation outputs a separate mask for each object. Panoptic segmentation handles uncountable regions such as sky and road together with countable objects such as people and cars in a single output.

Does segmentation need a lot of labelled images?

Pixel-level labelling is expensive. Large promptable segmentation models can transfer to new image distributions without extra training and can be used to speed up labelling.

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.