Abstract
Current state-of-the-art instance segmentation methods are not suited for real-time applications like autonomous driving, which require fast execution times at high accuracy. Although the currently dominant proposal-based methods have high accuracy, they are slow and generate masks at a fixed and low resolution. Proposal-free methods, by contrast, can generate masks at high resolution and are often faster, but fail to reach the same accuracy as the proposal-based methods. In this work we propose a new clustering loss function for proposal-free instance segmentation. The loss function pulls the spatial embeddings of pixels belonging to the same instance together and jointly learns an instance-specific clustering bandwidth, maximizing the intersection-over-union of the resulting instance mask. When combined with a fast architecture, the network can perform instance segmentation in real-time while maintaining a high accuracy. We evaluate our method on the challenging Cityscapes benchmark and achieve top results (5% improvement over Mask R-CNN) at more than 10 fps on 2MP images.
Introduction
Instance segmentation—the task of identifying every individual object in an image and outlining it with a pixel-perfect mask—is computationally expensive and critical for autonomous systems. Currently, the field is split between proposal-based methods (e.g., Mask R-CNN), which are accurate but slow, and proposal-free methods, which are faster but historically struggle with accuracy.
A core challenge in proposal-free methods is clustering: deciding which pixels belong to the same object. Previous methods often used a fixed distance margin, which fails to account for the vast scale differences between objects like a distant pedestrian and a nearby bus. This paper introduces a novel clustering loss function that jointly learns spatial embeddings and instance-specific margins to bridge the accuracy gap while maintaining real-time speeds.
Methodology
The proposed method treats instance segmentation as a pixel assignment problem using a lightweight encoder-decoder architecture based on ERFNet.
Spatial Embeddings and Learnable Bandwidth
Instead of simple classification, the network learns a "spatial embedding" for every pixel: an offset vector pointing toward the center of the object it belongs to. The "secret sauce" of this approach is the Learnable Bandwidth (Sigma). The network predicts a unique margin for every pixel. For large objects, the network learns a large sigma, creating a wide "catchment area" around the center; for small objects, it learns a tight sigma.
Optimization and Inference
To ensure high-quality masks, the authors use the Lovasz-hinge loss, which directly optimizes the Intersection-over-Union (IoU) of the masks. During inference, a separate "seed map" identifies pixels very close to an object's center. These seeds serve as starting points for clustering pixels based on their predicted offsets and the learned instance-specific bandwidths.
Experimental Results
The model was trained and evaluated on the Cityscapes dataset, focusing on high-quality urban street scenes.
Accuracy and Speed
On the Cityscapes test set, the method achieved an Average Precision (AP) of 27.6, outperforming the standard Mask R-CNN (26.2 AP) when both were trained on the same data. Crucially, the system runs at 11 frames per second (fps) on 2-megapixel images, whereas Mask R-CNN typically runs at about 2 fps on similar hardware. The forward pass takes roughly 65ms, and the clustering step takes 26ms, making it viable for real-time autonomous driving.
Key Insights
- Adaptive Margins: By letting the network "choose" the clustering margin for each object, the system becomes robust to scale variations. Learning two sigmas (X and Y) even allows for elliptical margins, which are ideal for elongated objects like pedestrians.
- Direct IoU Optimization: Using the Lovasz-hinge loss ensures the training objective aligns with the final evaluation metric (Jaccard index), leading to superior mask quality.
- Small Object Detection: Qualitatively, the model is particularly adept at detecting small objects, sometimes identifying correct instances missed by human annotators in the ground truth.
Conclusion
This work demonstrates that proposal-free instance segmentation can achieve state-of-the-art accuracy without sacrificing the speed required for real-time applications. While the model currently struggles with highly underrepresented classes (like trains or trucks), its ability to handle scale variance through learnable bandwidths represents a significant step forward. Future work will explore incorporating more diverse training data to improve performance on rare object categories.
Summary updated