End-to-End Instance Segmentation and Counting with Recurrent Attention

Mengye Ren, Richard S. ZemelarXiv 2016

Introduction

Distinguishing individual objects of the same class within a cluttered scene—known as instance segmentation—is a fundamental yet difficult task in computer vision. While semantic segmentation identifies pixel-level class labels, it fails to separate adjacent or overlapping instances. This paper, "End-to-End Instance Segmentation with Recurrent Attention" by Mengye Ren and Richard Zemel, proposes a novel recurrent neural network (RNN) framework that mimics the human process of counting: focusing on one object, marking it, and moving to the next.

The Challenge of Instance Segmentation

Traditional approaches to instance segmentation typically follow a "bottom-up" strategy: detecting bounding boxes, segmenting the interior of those boxes, and applying Non-Maximal Suppression (NMS) to prune duplicates. However, NMS often fails in crowded scenes where objects significantly overlap, as it may mistakenly suppress a heavily occluded object. Furthermore, these multi-stage pipelines are difficult to optimize end-to-end. The authors address these issues by formulating segmentation as a sequential task, allowing the model to learn a "dynamic NMS" through internal state tracking.

Recurrent Attention Architecture

The proposed architecture consists of four integrated components that operate over discrete time steps $t$:

  1. External Memory (The Canvas): A multi-channel memory that tracks the cumulative segmentation mask. This allows the network to "remember" which pixels have already been assigned to an instance, preventing redundant detections.
  2. Box Proposal Network: Utilizing a "soft-attention" mechanism via a glimpse LSTM, this component determines the coordinates for a bounding box around the next target object.
  3. Segmentation Network: A deconvolutional sub-network that focuses on the proposed box region to generate a high-resolution pixel-level mask for the dominant object.
  4. Scoring Network: A linear layer that outputs a confidence score $s_t$, indicating whether the current glimpse contains a valid object and signaling when to terminate the sequence.
Architecture and training flow of the recurrent instance segmentation model.

The system is trained using a joint loss function that incorporates a matching IoU loss (solved via the Hungarian algorithm), a soft box loss, and a monotonic score loss to prioritize the most confident instances.

Experimental Evaluation

The model was evaluated across several diverse benchmarks, including the CVPPP Leaf Segmentation Challenge, KITTI, and Cityscapes.

Leaf Segmentation and Counting

On the CVPPP dataset, which features complex plant rosettes with overlapping leaves, the model achieved a Symmetric Best Dice (SBD) score of 84.9, a significant improvement over the previous state-of-the-art (74.4). Notably, the model excelled at counting, with a mean absolute error (|DiC|) of only 0.8, outperforming specialized counting models.

Sequential segmentation steps on the CVPPP leaf dataset. The rows show glimpses, bounding box proposals, individual masks, and cumulative results.

Urban Scene Segmentation

In driving scenarios (KITTI and Cityscapes), the model demonstrated competitive performance against complex multi-stage pipelines. By treating segmentation as a temporal chain, the model effectively handles disconnected components (e.g., a car partially occluded by a pole) by relying on the top-down global view provided by the box network.

Discussion and Key Insights

The core innovation of this work is the concept of Dynamic NMS. By maintaining an external memory of previous segments, the model naturally learns to ignore already-processed pixels and focus on occluded regions without requiring hard-coded overlap thresholds. This sequential reasoning reduces the high dimensionality of the output space by predicting one mask at a time.

While the model shows great promise, limitations remain. Downsampling images to manage training complexity can hinder the detection of small, distant objects. Additionally, the model occasionally exhibits "hallucination" errors due to a lack of deep geometric priors for certain classes. Future research will focus on scaling the architecture to handle a larger number of object classes and improving resolution handling.

Summary updated

BibTeX
@misc{ren2016end,
  author = {Mengye Ren and Richard S. Zemel},
  title = {{End-to-End Instance Segmentation and Counting with Recurrent Attention}},
  year = {2016},
  eprint = {1605.09410},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1605.09410},
}
Figure