SandHouse
Pages and contents

Segmentation

Definitions

A binary mask is an image-sized grid where every pixel has one of two values:

• 1: this pixel belongs to the segment
• 0: this pixel does not belong to the segment

A trimap divides an image into definite foreground (white), definite background (black), and unknown or transition pixels (gray).

Methods

Image segmentation is the machine learning study of grouping pixels. There are three main types of segmentation, Semantic segmentation, Instance segmentation, and Panoptic segmentation.

Semantic

Semantic segmentation studies an image as uncountable segments. It analyzes each pixel and assigns a class label based on the texture it represents. For example, in the following picture with three people, a beach, a kite, and the sky, the three people represent the same texture and therefore the same segmented class.

[image: Screenshot_2026-07-25_at_2.29.16 PM.png]

Semantic segmentation’s output cannot differentiate or count the two cars or three pedestrians separately, thus it is uncountable. Commonly used semantic segmentation techniques include SegNet, U-Net, DeconvNet, and FCNs.

Instance

Instance segmentation involves tasks concerning countable objects. It can detect each object or instance of a class present in an image and assigns it a different mask or bounding box with a unique identifier.

[image: Screenshot_2026-07-25_at_2.40.13 PM.png]

Commonly used instance segmentation techniques are Mask R-CNN, Faster R-CNN, PANet, and YOLACT.

Panoptic

Panoptic segmentation is the best of both worlds. It presents a unified image segmentation approach where each pixel in a scene is assigned a semantic label (due to semantic segmentation) and a unique instance identifier (due to instance segmentation). This is the most interesting form of segmentation, as it provides the downstream usage with the most useful information.

Evaluation

MIoU

The Mean Intersection over Union (mIoU) of a segmentation task quantifies the degree of overlap between the predicted segmented region and the real segmented region.