# U-Net: Contracting and expanding paths with skip connections

> U-Net combines a context-encoding contracting path, a resolution-restoring expanding path and skip connections. Elastic augmentation enables strong biomedical segmentation with few annotated images.

- URL: https://dmxsf.com/en/blog/u-net-convolutional-networks-for-biomedical-image-segmentation/
- [DMXSF](https://dmxsf.com/en/about/)
- Published: 2015-05-28
- Updated: 2026-11-13
- Paper notes
- Paper: [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597) (Olaf Ronneberger, Philipp Fischer, Thomas Brox · MICCAI 2015, 2015)

U-Net assigns a class to every pixel. Its symmetric paths preserve both semantic context and spatial precision, unlike a classifier that emits one label.

## How it works

The contracting path convolves and pools, while the expanding path upsamples and concatenates corresponding high-resolution features. The original valid convolutions make outputs smaller than inputs, with overlap-tile processing for large images.

## What the evidence shows

The paper wins ISBI 2012 neuronal-structure segmentation using few annotations and elastic deformation. A weighted loss emphasizes borders between touching cells.

## A reproducible check

This snippet checks a public formula or configuration; it does not reproduce full training.

```python
input_hw = 572
output_hw = 388
levels = 4
print("original input size =", input_hw)
print("original output size =", output_hw)
print("encoder pooling levels =", levels)
```

```text
original input size = 572
original output size = 388
encoder pooling levels = 4
```

The arithmetic is reproducible, but model quality still depends on the full experiments in the paper.

## Limitations and common misreadings

Original valid-padding dimensions should not be confused with modern same-padding implementations. Biomedical results do not guarantee natural-image generality, and augmentations must transform labels consistently.

## The key takeaway

The essential idea is not merely the U shape: cross-level concatenation restores localization detail, a pattern later common in diffusion backbones.

## Further reading

- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597)
- [ResNet](https://dmxsf.com/en/blog/deep-residual-learning-for-image-recognition/)
- [DDPM](https://dmxsf.com/en/blog/ddpm-denoising-diffusion-probabilistic-models/)

## FAQ

### What do skip connections do?

They concatenate high-resolution encoder features into the decoder to restore localization detail.

### Why elastic deformation?

It creates plausible augmented biomedical samples while transforming labels consistently.

### Why weight border pixels?

To emphasize difficult boundaries between touching objects.
