Semantic Instance Segmentation with a Discriminative Loss Function

Bert De Brabandere, Davy Neven, Luc Van GoolarXiv 2017

Abstract

This paper introduces a "proposal-free" approach to instance segmentation by utilizing a novel discriminative loss function. Instead of predicting bounding boxes, the network learns to map every pixel into a high-dimensional feature space where pixels belonging to the same object naturally cluster together. This allows for simple and fast post-processing to identify individual instances, overcoming common hurdles like variable instance counts and permutation invariance.

Introduction

Instance segmentation—the task of identifying and masking every individual object in an image—is significantly more complex than standard semantic segmentation. Two main hurdles exist: variable instance counts and permutation invariance (the specific ID assigned to an object does not matter, only its uniqueness). Most existing solutions at the time relied on "detect-and-segment" pipelines, such as Mask R-CNN, which first identify a bounding box and then mask the object within. However, these methods often fail when objects have complex, overlapping shapes where bounding boxes overlap almost entirely.

Methods

The authors propose a Discriminative Loss Function that treats instance segmentation as a metric learning problem. The goal is to train a standard Convolutional Neural Network (CNN) to output a "pixel embedding" (a vector for each pixel). The loss function consists of three "hinged" terms:

  • Variance Term (Pull): An intra-cluster force that pulls all pixel embeddings of a single instance toward their mean embedding (the cluster center).
  • Distance Term (Push): An inter-cluster force that pushes the centers of different instances away from each other.
  • Regularization Term: A small force that pulls all clusters toward the origin to keep the feature values bounded.
The discriminative loss function uses intra-cluster pull forces and inter-cluster push forces to organize pixel embeddings in a feature space.

Because the loss is "hinged," the forces stop acting once pixels are "close enough" to their center or centers are "far enough" from each other. For post-processing, a fast variant of Mean-Shift clustering groups the pixels into final instances. This method is architecture-agnostic; any off-the-shelf semantic segmentation network can be adapted by changing the final layer to output embeddings.

Key Results and Insights

The researchers evaluated their method on the CVPPP Leaf Segmentation and Cityscapes datasets. On CVPPP, the method achieved a Symmetric Best Dice (SBD) of 84.2, performing on par with state-of-the-art models while remaining conceptually simpler. On Cityscapes, the model proved highly competitive and robust to overlapping instances, particularly in the car class.

A visualization of the pipeline: the original image (top-left) is mapped to a clustered feature space (top-right), resulting in the final instance segmentation (bottom).

A key insight from ablation studies was that the quality of the underlying semantic segmentation is a larger bottleneck than the clustering logic itself. Furthermore, the post-processing clustering step adds negligible overhead, making the system potentially viable for real-time applications.

Limitations and Future Work

While effective, the method can struggle with datasets where objects appear in highly diverse constellations, such as MS COCO, compared to the more structured scenes of Cityscapes. Additionally, the clustering effect is less pronounced for very small instances. Future research may focus on the joint training of semantic and instance segmentation to further improve feature representations.

Summary updated

BibTeX
@misc{brabandere2017semantic,
  author = {Bert De Brabandere and Davy Neven and Luc Van Gool},
  title = {{Semantic Instance Segmentation with a Discriminative Loss Function}},
  year = {2017},
  eprint = {1708.02551},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.02551},
}
Figure