NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Watershed Transform for Instance Segmentation

Min Bai, Raquel Urtasun

Abstract

Most contemporary approaches to instance segmentation use complex pipelines involving conditional random fields, recurrent neural networks, object proposals, or template matching schemes. In this paper, we present a simple yet powerful end-to-end convolutional neural network to tackle this task. Our approach combines intuitions from the classical watershed transform and modern deep learning to produce an energy map of the image where object instances are unambiguously represented as energy basins. We then perform a cut at a single energy level to directly yield connected components corresponding to object instances. Our model achieves more than double the performance over the state-of-the-art on the challenging Cityscapes Instance Level Segmentation task.

Introduction

Instance segmentation represents one of the most demanding tasks in computer vision, requiring models to simultaneously perform pixel-level classification (semantic segmentation) and individual object identification. Historically, this has been addressed through multi-stage pipelines. Some methods rely on object proposals (bounding boxes) followed by mask refinement, while others use Recurrent Neural Networks (RNNs) to sequentially "count" and segment objects. These approaches are often computationally heavy and difficult to optimize end-to-end.

Researchers from the University of Toronto have introduced a more elegant solution by reimagining the classical watershed transform—a morphological tool from the 1970s—as a modern deep learning architecture. By training a convolutional neural network (CNN) to learn a "clean" energy landscape, they have simplified the grouping of pixels into distinct object instances.

The Deep Watershed Transform

In classical image processing, the watershed transform treats an image like a topographic map where pixel intensity represents height. "Flooding" this map creates catchment basins that correspond to regions. However, traditional watershed methods are notoriously sensitive to noise, often leading to "over-segmentation" where a single object is fractured into many tiny fragments.

Comparison of traditional watershed energy (top) which is prone to noise and over-segmentation, versus the proposed learned energy (bottom) which creates clean, distinct basins for each instance.

The authors overcome this by using a two-stage CNN architecture to learn an optimized energy map specifically designed for segmentation:

  1. Direction Network (DN): Instead of predicting energy directly from raw pixels, the model first predicts a unit vector field. At every pixel, the network estimates the direction toward the center of the object it belongs to. This intermediate task provides a stable training signal and helps the network understand object geometry.
  2. Watershed Transform Network (WTN): This network processes the direction field to produce a discretized energy map (typically with 16 levels). In this map, object centers are deep basins (high energy values), and boundaries are high ridges.
Visualization of the pipeline: (b, f) show the ground truth and predicted direction angles; (c, g) show the watershed energy maps; (d, h) show the final instance segmentation.

To extract individual objects during inference, the model simply "cuts" the energy map at a fixed threshold. Because the network is trained to place all object boundaries at the same relative "height," a single cut instantly yields connected components representing individual instances. This process has a constant runtime regardless of the number of objects in the scene.

Key Results and Performance

The model was evaluated on the Cityscapes dataset, which consists of 5,000 high-resolution images of urban street scenes. This benchmark is particularly challenging due to high object density and extreme variations in scale.

The Deep Watershed Transform achieved a massive leap in performance, reaching an Average Precision (AP) of 19.4% on the Cityscapes test set. This more than doubled the previous state-of-the-art of 8.9%. The gains were most significant for common urban categories, such as cars (31.5% AP) and buses (27.0% AP).

Discussion and Limitations

While highly effective, the method does face specific challenges:

  • Occlusions: If an object is physically split by an obstacle (e.g., a pole in front of a car), the model may treat the two visible halves as separate instances because it relies on connected components.
  • Tight Packing: In extremely crowded scenes, the "ridges" between objects may become too low, causing the model to merge adjacent instances.
  • Semantic Dependency: The system's accuracy is partially dependent on the quality of the initial semantic segmentation used to gate the process.

Despite these limitations, the Deep Watershed Transform demonstrates that bottom-up grouping can outperform complex proposal-based systems when the underlying energy landscape is learned correctly by a deep network.

Summary updated

BibTeX
@inproceedings{bai2017deep,
  author = {Min Bai and Raquel Urtasun},
  title = {{Deep Watershed Transform for Instance Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=rkb520-uWH},
}
Figure