tezvyn:

Adapting a classification CNN for segmentation

AI-drafted, machine-checkedSource: interviewadvanced
WHAT IT TESTS

turning a classifier into a dense predictor.

OUTLINE

replace the dense head with conv layers, upsample via transposed convolutions, and fuse encoder skip connections to recover spatial detail lost to downsampling.

WHAT THIS TESTS Whether you understand the tension between the downsampling that builds semantic features and the full-resolution output segmentation demands.

A GOOD ANSWER COVERS A classification ResNet repeatedly downsamples through strided stages, then applies global average pooling and a fully connected layer to emit a single class vector. Segmentation needs a class label per pixel at the input resolution. The first change is making the network fully convolutional, removing the dense head so it can accept any input size and produce a spatial map. The encoder still downsamples to extract rich semantics, producing a coarse, low-resolution feature map. A decoder then upsamples this back to full resolution using transposed convolutions, which learn the upsampling, or bilinear upsampling. The core challenge is that downsampling discards precise location information, so naive upsampling yields blurry, imprecise boundaries. Skip connections solve this by fusing high-resolution feature maps from early encoder stages into the decoder, restoring fine spatial detail while keeping the deep semantics.

COMMON WRONG ANSWERS Saying you just enlarge the output with interpolation; that alone gives coarse boundaries. Keeping the global pooling and dense layer. Ignoring that low-level skip features carry the localization the deep layers lost. Confusing transposed convolution with simple unpooling.

LIKELY FOLLOW-UPS What is a transposed convolution and what causes its checkerboard artifacts. How does FCN's skip fusion differ from U-Net's. Why combine deep semantic and shallow spatial features. How do dilated convolutions offer an alternative to heavy upsampling.

ONE CONCRETE EXAMPLE Take a ResNet that downsamples a two-twenty-four by two-twenty-four image to seven by seven. Replace the classifier head with a one by one conv producing per-class scores at seven by seven, then upsample by thirty-two times. Predicting boundaries from a seven by seven grid is hopelessly coarse, so you add skip connections that add in the sixteen-fold and eight-fold resolution feature maps before upsampling, sharpening object edges dramatically, which is exactly the progression from FCN-32s to FCN-8s.

Read the original → arxiv.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.