Deep Watershed Transform for Instance Segmentation
Switch branches/tags
Nothing to show
Clone or download
Latest commit 03fe206 Oct 23, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
DN added ROUGH training code May 25, 2017
E2E update May 4, 2017
WTN added ROUGH training code May 25, 2017
example adding examples Oct 23, 2017
matlab added ROUGH training code May 25, 2017
LICENSE Initial commit May 4, 2017
README initial commit May 4, 2017 update readme May 4, 2017

Deep Watershed Transform

Performs instance level segmentation detailed in the following paper:

Min Bai and Raquel Urtasun, Deep Watershed Transformation for Instance Segmentation, in CVPR 2017. Accessible at

This page is still under construction.


Developed and tested on Ubuntu 14.04 and 16.04.

  1. TensorFlow
  2. Numpy, Scipy, and Skimage (sudo apt-get install python-numpy python-scipy python-skimage)


  1. Cityscapes images (
  2. Semantic Segmentation for input images. In our case, we used the output from PSPNet (by H. Zhao et al. These are uint8 images with pixel-wise semantic labels encoded with 'trainIDs' defined by Cityscapes. For more information, visit


The model produces pixel-wise instance labels as a uint16 image with the same formatting as the Cityscapes instance segmentation challenge ground truth. In particular, each pixel is labeled as 'id' * 1000 + instance_id, where 'id' is as defined by Cityscapes (for more information, consult in the above link), and instance_id is an integer indexing the object instance.

Testing the Model

  1. Clone repository into dwt/.
  2. Download the model from and place into the "dwt/model" directory.
  3. run "cd E2E"
  4. run "python"
  5. The results will be available in "dwt/example/output".

Training the Model

  1. Will be available soon.