Recurrent Neural Networks for Semantic Instance Segmentation

Amaia Salvador, Miriam Bellver, Manel Baradad, Ferran Marqués, Jordi Torres, Xavier Giró-i-NietoarXiv 2017

Abstract

We present a recurrent model for semantic instance segmentation that sequentially generates binary masks and their associated class probabilities for every object in an image. Our proposed system is trainable end-to-end from an input image to a sequence of labeled masks and, compared to methods relying on object proposals, does not require post-processing steps on its output. We study the suitability of our recurrent model on three different instance segmentation benchmarks, namely Pascal VOC 2012, CVPPP Plant Leaf Segmentation and Cityscapes. Further, we analyze the object sorting patterns generated by our model and observe that it learns to follow a consistent pattern, which correlates with the activations learned in the encoder part of our network.

Introduction

Instance segmentation—the task of identifying and masking every individual object in an image—is traditionally solved using a "detect-then-segment" pipeline. These methods typically generate thousands of candidate "proposals," score them, and then use Non-Maximum Suppression (NMS) to filter out duplicates. However, this approach acts as a surrogate for the actual task and relies heavily on manual post-processing. Furthermore, standard feedforward architectures struggle with the "cardinality problem": images contain a variable number of objects, whereas standard networks produce fixed-size outputs.

This paper introduces a fully end-to-end recurrent model that performs semantic instance segmentation by generating a sequence of binary masks and class labels, one object at a time. By treating the problem as a sequence prediction task, the model naturally handles variable-length sequences of objects directly from image pixels, avoiding the need for object proposals or complex post-processing.

Architecture and Methodology

The proposed architecture follows an encoder-decoder structure designed to preserve spatial information while managing sequential dependencies.

Architecture of the recurrent instance segmentation model featuring an encoder and a hierarchical ConvLSTM decoder.

Encoder

A truncated ResNet-101, pretrained on ImageNet, serves as the encoder to extract features at different levels of abstraction.

Recurrent Decoder

The core innovation is a hierarchical chain of Convolutional LSTMs (ConvLSTMs). Unlike standard LSTMs, ConvLSTMs maintain spatial dimensions in their hidden states. The decoder utilizes skip connections from the encoder to refine masks, allowing the model to leverage both high-level semantic information and low-level spatial details. At each time step $t$, the model outputs:

  • A binary segmentation mask ($\hat{y}_m$).
  • Bounding box coordinates ($\hat{y}_b$).
  • Class probabilities ($\hat{y}_c$).
  • An "objectness" score ($\hat{y}_s$) serving as a stopping criterion.

Training Strategy

Since ground truth is an unordered set and the model output is an ordered sequence, the authors employ the Hungarian algorithm to find the optimal matching between predicted and ground-truth masks for loss computation. For high-density datasets like Cityscapes, curriculum learning is used, starting with images containing few objects and gradually increasing complexity.

Experimental Evaluation

The model was evaluated on three distinct benchmarks to test its versatility across different domains and object densities.

Qualitative results showing instance segmentation on Pascal VOC 2012, CVPPP, and Cityscapes datasets.
  • Pascal VOC 2012: Focused on general objects with low average counts (~2.3 per image). The model achieved an $AP_{50}$ of 60.7 for the "person" category, significantly outperforming previous sequential state-of-the-art methods (46.6).
  • CVPPP Plant Leaf Segmentation: A specialized dataset with many similar, overlapping objects (~16.2 leaves per image). The model reached a Symmetric Best Dice (SBD) score of 74.7.
  • Cityscapes: Complex urban scenes with high object density (~17.5 per image). While competitive with other sequential models ($AP_{50}$ of 45.7 for cars), it currently lags behind proposal-based methods like Mask R-CNN on very small or distant objects.

Analysis and Discussion

A key finding is the discovery of an emergent "scanpath." Without explicit ordering constraints, the model learns a consistent sequence—for example, segmenting objects from right-to-left in Pascal VOC. This order correlates strongly with feature activations in the encoder, suggesting the network organizes the scene internally before decoding begins.

Limitations

The model's global scale operation makes it less effective for tiny objects compared to "zoom-in" proposal methods. Additionally, mask quality can degrade in very long sequences, likely due to the fixed-size feature bottleneck in the encoder. Future work may explore parallelizing the RNN or utilizing higher-resolution inputs to better capture fine-grained instances.

Source code and models are available at https://imatge-upc.github.io/rsis/

Summary updated

BibTeX
@misc{salvador2017recurrent,
  author = {Amaia Salvador and Miriam Bellver and Manel Baradad and Ferran Marqués and Jordi Torres and Xavier Giró-i-Nieto},
  title = {{Recurrent Neural Networks for Semantic Instance Segmentation}},
  year = {2017},
  eprint = {1712.00617},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.00617},
}
Figure