Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

difficulty 3/5

Semantic segmentation

Definition

A class label for every pixel. The output is the same size as the input, which forces an encoder-decoder shape and makes pixel accuracy a useless way to score it.

Formula
IoUc=∣Pc∩Gc∣∣Pc∪Gc∣mIoU=1∣C∣∑c∈CIoUc\mathrm{IoU}_c = \frac{|P_c \cap G_c|}{|P_c \cup G_c|} \qquad \mathrm{mIoU} = \frac{1}{|C|}\sum_{c \in C} \mathrm{IoU}_c

Intuition

Object detection answers "what is here, roughly where". Semantic segmentation answers it per pixel. d2l draws the contrast directly: "different from object detection, semantic segmentation recognizes and understands what are in images in pixel level: its labeling and prediction of semantic regions are in pixel level. Compared with in object detection, the pixel-level borders labeled in semantic segmentation are obviously more fine-grained" [1, §14.9].

Two consequences follow, and they organise the rest of this page. The output is the same shape as the input, so the architecture has to shrink and then grow again. And the classes are wildly unbalanced by construction — most pixels in most images are background — so the obvious metric is worthless.

Formal definition

How it works

Where it's used

Why & when

Worked example

Pitfalls

Check yourself

3 questions

The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.

Unlock all quizzes

On the cheat sheet: Vision tasks →

Sources

  1. Zhang, Lipton, Li, Smola. Dive into Deep Learning — Semantic Segmentationbook · retrieved 2026-09-14https://d2l.ai/chapter_computer-vision/semantic-segmentation-and-dataset.html
  2. Zhang, Lipton, Li, Smola. Dive into Deep Learning — Fully Convolutional Networksbook · retrieved 2026-09-14https://d2l.ai/chapter_computer-vision/fcn.html
  3. Ronneberger, Fischer, Brox. U-Net: Convolutional Networks for Biomedical Image Segmentation (2015)paperhttps://ar5iv.labs.arxiv.org/html/1505.04597

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com