What is semantic segmentation?

Semantic segmentation is the computer vision task of assigning a class label to every pixel in an image. Each pixel takes the class of its enclosing object or region, giving a class map the same size as the image.

Unlike instance segmentation, it does not separate objects: two vehicles of the same class share one label and look like one region.

Topic
Machine learning, models and training
Also known as
Per-pixel classification
Origin
2015, deep learning approach with fully convolutional networks (FCN)

How semantic segmentation works

  1. A convolutional neural network extracts features layer by layer; deeper layers carry more semantic but coarser information.
  2. Fully convolutional networks (FCNs) take input of any size and produce matching output; in-network upsampling brings coarse output back to pixel level.
  3. U-Net pairs a contracting path that captures context with a symmetric expanding path for precise localisation.
  4. Training uses a per-pixel loss; performance is usually measured by mean intersection over union (mean IoU) across classes.

In more detail

Mean IoU

Intersection over union (IoU) measures the overlap between the predicted pixel region for a class and the true region: the intersection of the two divided by their union. The work on fully convolutional networks reports this value averaged over all classes, background included.

Commonly confused terms

TermHow it differs
Image classificationImage classification gives the whole image a single label. Semantic segmentation takes the next step from coarse to fine inference by making a prediction at every pixel, showing where each class lies in the image.

Why semantic segmentation matters for on-premises AI

It gives pixel-level boundaries in fields such as autonomous driving and medical imaging. Fully convolutional networks, published at CVPR 2015, were the first FCNs trained end to end for pixelwise prediction and raised mean IoU on PASCAL VOC 2012 to 62.2%. U-Net, from the same year, trained from very few images and segmented a 512x512 image in under a second.

ON-PREMISES EXAMPLE

An energy company inspects solar panels with drone imagery. The model labels every pixel as panel, crack, dirt or vegetation; panel strings whose crack and dirt share exceeds a threshold join the maintenance list.

Common questions

Are semantic segmentation and image segmentation the same thing?

Image segmentation is the umbrella term; semantic, instance and panoptic segmentation are its types. Semantic segmentation assigns every pixel to a class, while panoptic segmentation unifies semantic and instance segmentation in one task.

What data does a semantic segmentation model need?

Masks marking the class of every pixel. Successful training of deep networks is widely held to need many thousands of annotated samples, so methods such as U-Net rely on heavy data augmentation to use the available labelled images more efficiently.

Sources

In the glossary: Glossary, R to Z

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.