Skip to content
StackDecode
AI & ML Atlas
Deep LearningarchitectureInteractive simulation

U-Net

An encoder-decoder with skip connections for pixel-accurate segmentation.

The idea

The encoder shrinks the image while capturing context; the decoder grows it back. Skip connections copy the high-resolution features from each encoder stage straight to the matching decoder stage, restoring the fine detail lost by downsampling. The picture of the layers makes a "U". The same network is the denoiser inside many diffusion models.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

Plain deep networkWith skip connections (ResNet)out12345678910111213141516171819in
  • plain
  • with skip connections

The learning signal (gradient) starts at the output and travels backwards through 20 layers. Bar height shows its size at each layer on a log scale.

layers back:
0
1/7

A residual block computes x + F(x). The "+ x" is a shortcut the gradient can travel along.

Step by step

  1. 1Contract: repeated convolution and pooling reduce the resolution.
  2. 2Reach the bottleneck with the most abstract features.
  3. 3Expand: upsample step by step.
  4. 4Concatenate the matching encoder features at each level (skip connections).
  5. 5Output a per-pixel label map.

Where it is used

Medical image segmentation, diffusion model denoisers.

Watch out for

Memory-heavy at high resolutions.

Related