Course contentsShow
← Machine Learning and Deep Learning
Lesson 978 of 3,53822. Computer Vision TasksFree lesson

Upsampling and Transposed Convolutions

Understand transposed convolutions for learnable upsampling to restore spatial resolution in decoder paths.

Upsampling and Transposed Convolutions

What You'll Learn

You'll understand how transposed convolutions enable learnable upsampling to restore spatial resolution in segmentation decoder paths.

The Problem: Getting Back to Full Resolution

In semantic segmentation networks like FCNs, your encoder reduces spatial dimensions through pooling and striding (e.g., 224×224 → 7×7). To produce pixel-wise predictions, you need to upsample back to the original size. Simple methods like nearest-neighbor or bilinear interpolation work, but they use fixed patterns—no learning happens.

Transposed Convolutions: Learnable Upsampling

Transposed convolutions (also called deconvolutions or fractionally-strided convolutions) flip the regular convolution operation. Instead of reducing spatial dimensions, they expand them while learning optimal upsampling patterns.

How It Works

Think of regular convolution as many-to-one: multiple input pixels produce one output pixel. Transposed convolution is one-to-many: each input pixel generates multiple output pixels through learned kernel weights.

For example, with a 2×2 transposed convolution and stride 2:

  • Input: 7×7 feature map
  • Output: 14×14 feature map (doubled resolution)

The network learns how to fill in the missing details during training, rather than using fixed interpolation. This is crucial for decoder paths where you want to recover fine-grained spatial information lost during downsampling.

Why It Matters for Segmentation

In the decoder, transposed convolutions gradually restore resolution while combining high-level semantic features from the encoder with spatial details. Each upsampling step learns to reconstruct boundaries and details specific to your segmentation task.

Key Takeaway: Transposed convolutions provide learnable upsampling that adapts to your data, enabling decoders to intelligently restore spatial resolution for dense prediction tasks like semantic segmentation.