← Neural NetworksToolsInVisionLearning Center
Semantic Segmentation · Lesson 61

Understanding the U-Net Architecture

Use cell microscopy to connect U-Net’s encoder, decoder, skip connections, and channel concatenation.

Watch the lesson

Understanding the U-Net Architecture explained visually

2:48

Use cell microscopy to connect U-Net’s encoder, decoder, skip connections, and channel concatenation.

Lesson overview

What you will learn

Assign pixel labels and compare fully convolutional, U-Net, and SegNet decoders.

  1. Combine context with boundary detail
  2. Follow encoder and decoder roles
  3. Transfer and concatenate encoder features
  4. Interpret dimensions and prediction quality
01

Combine context with boundary detail

Imagine examining a microscope image of cells. To identify a cell, you need enough context to recognize its overall shape. To outline it accurately, you also need fine detail near its boundary.

U Net is a segmentation architecture designed to combine these kinds of information. It was originally developed for biomedical image segmentation.

Its structure contains an encoder followed by a decoder. When drawn as a diagram, the path down through the encoder and up through the decoder resembles the letter U.

02

Follow encoder and decoder roles

The encoder extracts features and reduces spatial dimensions. As information passes through deeper layers, features can describe a wider region of the image.

However, smaller feature maps provide a less detailed spatial grid. This can make precise boundaries harder to reconstruct using deep features alone.

The decoder increases spatial resolution and builds a dense prediction map.

03

Transfer and concatenate encoder features

U Net also sends information directly from encoder stages to corresponding decoder stages. These connections are called skip connections.

In the classic design, the decoder combines an upsampled feature map with a corresponding encoder feature map by joining their channels. This operation is called concatenation.

The decoder therefore receives both deeper contextual information and features from an earlier stage with finer spatial detail.

04

Interpret dimensions and prediction quality

For a simplified example, imagine an input that is two hundred fifty six pixels wide and high. Encoder stages reduce the grid to one hundred twenty eight, then sixty four positions along each side.

Decoder stages increase the grid size again. At matching stages, skip connections supply the corresponding encoder features.

This is a teaching example, not an exact description of every original dimension. The original U Net used unpadded convolutions and cropping. Many later versions use padding to maintain dimensions within a stage.

For a cell segmentation task, the final output can provide scores for cell and background at each target pixel.

Skip connections help combine detail and context, but accurate masks still depend on useful training data and effective training.

In the next lesson, we will compare U Net with another encoder and decoder design called Seg Net.

Knowledge check

Quick check: test your understanding

What information do classic U-Net skip connections carry?

Encoder feature maps from corresponding spatial stages.

How are corresponding features combined in the classic design?

By concatenating their channels with the upsampled decoder features.

Are the illustrated 256 → 128 → 64 sizes an exact reproduction of original U-Net?

No. They are simplified teaching dimensions. The original used unpadded convolutions and cropping.

Accessible referenceLesson 61 transcript341 words · Matches the published narration and captionsOpen transcript

Imagine examining a microscope image of cells. To identify a cell, you need enough context to recognize its overall shape. To outline it accurately, you also need fine detail near its boundary. U Net is a segmentation architecture designed to combine these kinds of information. It was originally developed for biomedical image segmentation.

Its structure contains an encoder followed by a decoder. When drawn as a diagram, the path down through the encoder and up through the decoder resembles the letter U. The encoder extracts features and reduces spatial dimensions. As information passes through deeper layers, features can describe a wider region of the image.

However, smaller feature maps provide a less detailed spatial grid. This can make precise boundaries harder to reconstruct using deep features alone. The decoder increases spatial resolution and builds a dense prediction map. U Net also sends information directly from encoder stages to corresponding decoder stages. These connections are called skip connections.

In the classic design, the decoder combines an upsampled feature map with a corresponding encoder feature map by joining their channels. This operation is called concatenation. The decoder therefore receives both deeper contextual information and features from an earlier stage with finer spatial detail. For a simplified example, imagine an input that is two hundred fifty six pixels wide and high. Encoder stages reduce the grid to one hundred twenty eight, then sixty four positions along each side.

Decoder stages increase the grid size again. At matching stages, skip connections supply the corresponding encoder features. This is a teaching example, not an exact description of every original dimension. The original U Net used unpadded convolutions and cropping. Many later versions use padding to maintain dimensions within a stage.

For a cell segmentation task, the final output can provide scores for cell and background at each target pixel. Skip connections help combine detail and context, but accurate masks still depend on useful training data and effective training. In the next lesson, we will compare U Net with another encoder and decoder design called Seg Net.