Fully Convolutional Networks for Semantic Segmentation

Evan Shelhamer, Jonathan Long, Trevor Darrell

Semantic segmentation—the task of assigning a class label to every single pixel in an image—has long been a "holy grail" of computer vision. In their seminal paper, Shelhamer, Long, and Darrell present a breakthrough that simplifies the pipeline while shattering previous performance records. Their secret? Turning standard image classifiers into "Fully Convolutional Networks" (FCNs).

TL;DR

The authors demonstrate that convolutional networks can be trained end-to-end for pixel-wise prediction by replacing fully connected layers with convolutional ones. By fusing multi-scale feature hierarchies through a novel "skip architecture," FCNs achieve a 30% relative improvement on PASCAL VOC while running over 100x faster than previous state-of-the-art methods.

What Problem Does This Paper Address?

Before this paper, semantic segmentation was often a clunky, multi-stage process. Researchers typically relied on "patch-wise" training (extracting small squares around pixels), which is computationally redundant because overlapping patches share so much data. Others used complex "machinery" like superpixels, proposals, or post-hoc refinement with Random Conditional Fields (CRFs) to clean up coarse outputs.

The fundamental challenge is the tension between semantics and location. Deep layers in a network are great at figuring out what is in an image (global semantics) but lose track of where things are due to subsampling. Shallow layers know exactly where things are (fine spatial detail) but don't understand the big picture.

Methods

The authors' approach is elegantly simple: take a high-performing classification network (like VGG16) and "convolutionalize" it.

1. Convolutionalization

Standard classifiers end with "fully connected" layers that require a fixed input size and spit out a single vector of class probabilities. The authors realized these layers are just convolutions with kernels that cover the entire input. By reinterpreting them as such, the network can take an input of any size and produce a spatial heatmap of classification scores.

![Fig.

  1. Transforming fully connected layers into convolution layers enables a classification net to output a spatial map.](/figures/art_ef14bed5f13043af956fbbe54c40de5f)

2. Upsampling and Learning

To get from coarse heatmaps back to pixel-resolution predictions, the authors use fractionally strided convolutions (sometimes called "deconvolutions"). Crucially, these upsampling layers are part of the network and are learned during backpropagation.

3. The Skip Architecture

To solve the "what vs. where" tension, the authors introduced a skip architecture. They take the coarse, high-level semantic information from the final layers and fuse it with the fine-grained appearance information from earlier, shallower layers (like pool4 and pool3).

![Fig.

  1. The skip architecture combines deep, coarse information with shallow, fine information to refine spatial precision.](/figures/art_e9c8e67a62de4fbd822ea6a47eb9a569)

Datasets

The models were trained and evaluated on several key benchmarks:

  • PASCAL VOC 2011/2012: The gold standard for object segmentation.
  • NYUDv2: An RGB-D dataset where the authors experimented with "late fusion" of color and depth information.
  • SIFT Flow: A dataset requiring both semantic (e.g., "bridge") and geometric (e.g., "horizontal") labels.
  • PASCAL-Context: A more challenging version of VOC with whole-scene annotations.

Key Insights and Ideas

  • Efficiency through Overlap: Whole-image training is significantly faster than patch-wise training. Because convolutions are highly optimized, computing the loss for an entire image at once is much more efficient than processing thousands of overlapping patches independently.
  • Pre-training is Powerful: The authors found that fine-tuning from a network pre-trained on ImageNet classification was essential. Even the "worst" FCN model outperformed many previous methods that were trained from scratch.
  • Resolution isn't the Bottleneck: Interestingly, the authors calculated that even a very coarse prediction (downsampled by 32x) could theoretically achieve a high Mean IU. This suggests that the real challenge in segmentation is recognition (getting the class right), not just the resolution of the output.

Key Results

  • State-of-the-Art Accuracy: On PASCAL VOC 2012, the FCN-8s model achieved 67.2% mean IU, a massive jump from the previous best of 51.6%.
  • Blazing Speed: Inference for a typical image takes roughly 100ms on a single GPU. This is orders of magnitude faster than previous systems that took 50 seconds or more per image.
  • Qualitative Refinement: The skip connections (moving from FCN-32s to FCN-8s) clearly help recover fine structures like bicycle frames and human limbs that are otherwise lost.

![Fig.

  1. Qualitative results showing how fusing information from different strides improves spatial detail.](/figures/art_8123c67a966b4a5ba8247d0f160e5dec)

Limitations and Future Work

While FCNs are a huge step forward, the authors note they still struggle with very fine-scale details (like hair vs. a dog's body) and occasionally confuse classes in complex scenes. They also observed that while the network uses context, it is still primarily driven by foreground pixels.

Future work in the field has since built on this by incorporating "dilated convolutions" to increase receptive fields and integrating CRFs directly into the end-to-end training process to further sharpen boundaries. Nevertheless, FCNs remain the foundational architecture for nearly all modern dense prediction tasks in computer vision.

Summary updated

Abstract

Convolutional networks are powerful visual models that yield hierarchies of features. We show that convolutional networks by themselves, trained end-to-end, pixels-to-pixels, improve on the previous best result in semantic segmentation. Our key insight is to build "fully convolutional" networks that take input of arbitrary size and produce correspondingly-sized output with efficient inference and learning. We define and detail the space of fully convolutional networks, explain their application to spatially dense prediction tasks, and draw connections to prior models. We adapt contemporary classification networks (AlexNet, the VGG net, and GoogLeNet) into fully convolutional networks and transfer their learned representations by fine-tuning to the segmentation task. We then define a skip architecture that combines semantic information from a deep, coarse layer with appearance information from a shallow, fine layer to produce accurate and detailed segmentations. Our fully convolutional network achieves improved segmentation of PASCAL VOC (30% relative improvement to 67.2% mean IU on 2012), NYUDv2, SIFT Flow, and PASCAL-Context, while inference takes one tenth of a second for a typical image.
BibTeX
@article{shelhamer2017fully,
  author = {Evan Shelhamer and Jonathan Long and Trevor Darrell},
  title = {{Fully Convolutional Networks for Semantic Segmentation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2017},
  url = {https://openreview.net/forum?id=SNHz8GbW2Ry},
}
Figure