A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Semantic Segmentation

Graduate Depth 99 in the knowledge graph ☐ I know this ☆ Set as goal
689prerequisites beneath it
See this on the map →
Convolutional Neural NetworksObject Detection Networks→
computer-vision dense-prediction deep-learning pixel-classification

Core Idea

Semantic segmentation assigns class labels to every pixel in an image, treating it as a dense prediction task. Encoder-decoder architectures and fully convolutional networks (FCNs) preserve spatial resolution; U-Net and DeepLab use skip connections and dilated convolutions to maintain receptive field while preserving detail; postprocessing with conditional random fields refines boundaries.

How It's Best Learned

Implement semantic segmentation on a dataset and visualize segmentation masks, then study how architectural choices (skip connections, dilation) affect boundary quality.

Explainer

Standard image classification, which you studied with convolutional neural networks, answers "what is in this image?" with a single label. Object detection goes further, drawing bounding boxes around individual objects. Semantic segmentation takes the final step: it assigns a class label to every single pixel. The output is not a label or a box but a dense prediction map the same size as the input image, where each pixel is colored by its predicted category — road, car, person, sky, building. This pixel-level understanding is essential for applications like autonomous driving, medical imaging, and satellite analysis, where knowing *where* objects are at precise boundaries matters as much as knowing *what* they are.

The fundamental challenge is that standard CNNs for classification progressively reduce spatial resolution through pooling and striding — by the time features reach the final layers, the spatial map might be 7×7 when the input was 224×224. Classification does not care about this loss because it only needs a single label, but segmentation needs to output a full-resolution map. Fully convolutional networks (FCNs) address this by replacing fully connected layers with convolutional ones and adding upsampling layers (transposed convolutions or bilinear interpolation) that gradually restore spatial resolution. The result is an encoder-decoder architecture: the encoder compresses the image into a compact, semantically rich representation, and the decoder expands it back to full resolution with per-pixel class predictions.

The problem with a simple encode-then-decode approach is that fine spatial details — object edges, thin structures, small objects — are lost during encoding and cannot be recovered by the decoder alone. Skip connections solve this by forwarding feature maps from early encoder layers directly to corresponding decoder layers. The early layers contain high-resolution spatial information (edges, textures) but limited semantic understanding, while deep layers have rich semantic information but coarse spatial resolution. Skip connections combine both, allowing the decoder to produce sharp boundaries informed by semantics. U-Net, originally designed for biomedical image segmentation, popularized this pattern with its symmetric encoder-decoder structure and dense skip connections at every level.

Another key architectural innovation is the dilated (atrous) convolution, used prominently in the DeepLab family of models. A standard 3×3 convolution looks at a 3×3 patch of pixels. A dilated convolution spaces out the kernel elements, so a 3×3 kernel with dilation rate 2 covers a 5×5 region while still using only 9 parameters. This expands the receptive field — the area of the input image that influences each output pixel — without adding parameters or reducing resolution. A large receptive field is important because correct pixel classification often depends on broad context: knowing a pixel belongs to "road" might require seeing the lane markings 50 pixels away. DeepLab combines dilated convolutions at multiple rates (atrous spatial pyramid pooling) to capture context at several scales simultaneously, and optionally refines boundaries with a conditional random field post-processing step that encourages neighboring pixels with similar colors to share labels.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Linear Regression in Machine Learning → Neural Network Fundamentals → Backpropagation Algorithm → Multilayer Perceptrons (MLPs) → Activation Functions in Neural Networks → Vanishing Gradient Problem → Gradient Descent and Optimization → Transfer Learning in Neural Networks → Object Detection Networks → Semantic Segmentation

Longest path: 100 steps · 689 total prerequisite topics

Prerequisites (2)

Leads To (0)

No topics depend on this one yet.