Fully convolutional networks for semantic segmentation

Jonathan Long, Evan Shelhamer, Trevor Darrell

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, exceed the state-of-the-art 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 [20], the VGG net [31], and GoogLeNet [32]) into fully convolutional networks and transfer their learned representations by fine-tuning [3] 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 state-of-the-art segmentation of PASCAL VOC (20% relative improvement to 62.2% mean IU on 2012), NYUDv2, and SIFT Flow, while inference takes less than one fifth of a second for a typical image.

Introduction

Convolutional Neural Networks (CNNs) have long been the gold standard for image classification, effectively identifying the presence of objects within an image. However, extending these models to semantic segmentation—the task of assigning a class label to every individual pixel—presented significant challenges. Prior to this work, semantic segmentation often relied on inefficient "patch-wise" training, complex pre-processing like superpixels, or computationally expensive post-processing with Random Conditional Fields (CRFs). These multi-stage pipelines were slow and failed to leverage the full potential of end-to-end learning.

This paper introduces Fully Convolutional Networks (FCNs), a novel approach that enables dense, pixel-wise prediction in a single, end-to-end pass. By re-engineering existing classification architectures, the authors demonstrate that CNNs can be trained pixels-to-pixels, achieving state-of-the-art results with significantly improved efficiency.

Methods

The transition from image-level classification to pixel-level segmentation is achieved through three primary technical innovations.

Convolutionalization

A key insight of this work is that fully connected layers, which typically flatten spatial information into a single feature vector, can be viewed as convolutions with kernels that cover the entire input region. By "convolutionalizing" these layers, the network is no longer restricted to a fixed input size. Instead of a single classification score, the network produces a spatial heatmap of class probabilities, preserving the spatial structure of the input image.

Convolutionalization: Transforming fully connected layers into convolutional layers allows the network to produce spatial heatmaps for any input size.

Transposed Convolutions for Upsampling

To map the coarse, low-resolution heatmaps from deep layers back to the original image resolution, the authors employ transposed convolutions (also known as "backwards convolutions"). Unlike simple bilinear interpolation, these layers contain learnable parameters, allowing the network to learn an optimal upsampling strategy for dense prediction.

Skip Architecture

While deep layers excel at capturing high-level semantic information ("what"), the successive pooling operations lead to a loss of spatial precision ("where"). To address this, the authors introduce a skip architecture that fuses information across different scales. By combining the semantic outputs of deep layers with the finer-grained feature maps from shallower layers, the model creates a "deep jet" of features that balances global context with local detail.

The FCN skip architecture combines coarse, semantic information from deep layers with fine, appearance information from shallow layers to refine segmentation boundaries.

Results

The FCN framework was evaluated on several major benchmarks, including PASCAL VOC, NYUDv2, and SIFT Flow. On the PASCAL VOC 2012 dataset, the FCN-8s model (which utilizes three scales of skip connections) achieved a mean Intersection over Union (mIU) of 62.2%, representing a 20% relative improvement over previous state-of-the-art methods.

Beyond accuracy, FCNs offer a massive improvement in computational efficiency. By processing the entire image in a single feed-forward pass, inference takes less than 175ms for a typical image—over 280 times faster than many contemporary patch-based pipelines. The architecture also proved versatile, successfully incorporating depth information in RGB-D datasets like NYUDv2 and performing multi-task learning on SIFT Flow.

Discussion and Limitations

Despite their success, FCNs face certain limitations. Even with skip connections, segmentation boundaries can appear somewhat "blobby" or coarse compared to ground truth labels. The network also struggles with very small objects that may be lost during the downsampling process. Furthermore, while FCNs capture more context than local patch methods, their receptive field is still finite. Future work has since built upon these foundations, exploring techniques like dilated convolutions and pyramid pooling to further enhance global context and boundary precision.

Nevertheless, the introduction of FCNs marked a paradigm shift in computer vision, establishing end-to-end, pixels-to-pixels training as the standard for dense prediction tasks.

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, exceed the state-of-the-art 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 [20], the VGG net [31], and GoogLeNet [32]) into fully convolutional networks and transfer their learned representations by fine-tuning [3] 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 state-of-the-art segmentation of PASCAL VOC (20% relative improvement to 62.2% mean IU on 2012), NYUDv2, and SIFT Flow, while inference takes less than one fifth of a second for a typical image.
BibTeX
@article{long2017fully,
  author = {Jonathan Long and Evan Shelhamer 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