YOLACT: Real-time Instance Segmentation

Daniel Bolya, Chong Zhou, Fanyi Xiao, Yong Jae Lee · DOI

Abstract

We present a simple, fully-convolutional model for real-time instance segmentation that achieves 29.8 mAP on MS COCO at 33.5 fps evaluated on a single Titan Xp, which is significantly faster than any previous competitive approach. Moreover, we obtain this result after training on only one GPU. We accomplish this by breaking instance segmentation into two parallel subtasks: (1) generating a set of prototype masks and (2) predicting per-instance mask coefficients. Then we produce instance masks by linearly combining the prototypes with the mask coefficients. We find that because this process doesn't depend on repooling, this approach produces very high-quality masks and exhibits temporal stability for free. Furthermore, we analyze the emergent behavior of our prototypes and show they learn to localize instances on their own in a translation variant manner, despite being fully-convolutional. Finally, we also propose Fast NMS, a drop-in 12 ms faster replacement for standard NMS that only has a marginal performance penalty.

TL;DR

YOLACT (You Only Look At CoefficienTs) is the first one-stage, fully-convolutional model to achieve real-time instance segmentation (30+ FPS) with competitive accuracy. By decomposing the task into two parallel sub-problems—generating global prototype masks and predicting per-instance coefficients—it bypasses the slow, sequential "re-pooling" steps used by traditional models like Mask R-CNN.

The Challenge of Real-Time Segmentation

In computer vision, object detection (bounding boxes) has achieved real-time speeds through models like SSD and YOLO. However, instance segmentation—identifying exact pixels for each object—remained computationally expensive.

The primary bottleneck was the "detect-then-segment" paradigm. State-of-the-art models like Mask R-CNN are two-stage: they first identify a bounding box and then "re-pool" features from that area to generate a mask. This sequential process is difficult to parallelize. YOLACT addresses this by providing a one-stage model that is fast enough for video while maintaining practical accuracy.

Methods: Parallelizing the Pipeline

The YOLACT architecture splits instance segmentation into two parallel branches that merge at the end of the pipeline:

  1. Protonet (Prototype Generation): This branch predicts a set of $k$ "prototype masks" for the entire image. These are global, image-sized maps representing various spatial or semantic features rather than specific objects.
  2. Prediction Head (Mask Coefficients): Parallel to standard object detection (predicting classes and boxes), this branch predicts $k$ "mask coefficients" for each instance, which act as weights for the prototypes.
YOLACT Architecture: The model splits the task into prototype generation (Protonet) and coefficient prediction, which are then assembled via linear combination.

The Assembly Step: To create a final mask, the model performs a linear combination of the prototypes using the object's specific coefficients, followed by a sigmoid nonlinearity and a crop based on the predicted bounding box. This matrix multiplication is highly efficient on GPUs. Additionally, the authors introduced Fast NMS, a parallelized version of Non-Maximum Suppression that saves approximately 12ms per frame.

Key Insights

  • Translation Variance from Invariance: Although Fully Convolutional Networks (FCNs) are typically translation-invariant, YOLACT's prototypes learn to localize objects by using zero-padding at image edges as a coordinate system.
  • Distributed Representation: Prototypes do not map 1-to-1 to classes. Instead, the model learns a distributed representation where different prototypes might handle edges, background, or specific spatial quadrants.
  • Superior Mask Quality: By avoiding the cropping and resizing of features (re-pooling), YOLACT produces masks for large objects that often follow boundaries more cleanly than those from two-stage models.
  • Temporal Stability: The global nature of prototypes and the simple linear assembly result in remarkably stable masks in video, reducing the "jitter" common in sequential models.

Key Results

Evaluated primarily on the MS COCO dataset, YOLACT demonstrated a significant leap in efficiency:

  • Speed: YOLACT-550 achieves 33.5 FPS on a single Titan Xp.
  • Accuracy: It reaches 29.8 mAP on MS COCO, making it nearly 4x faster than the previous fastest competitive approach at the time of publication.
  • Efficiency: The mask branch adds only ~5ms of overhead to the base detector.
Speed vs. Accuracy: YOLACT (Ours) is the first competitive model to cross the 30 FPS "Real-time" threshold while maintaining high Mask mAP.

Limitations and Future Work

Despite its speed, YOLACT faces challenges in crowded scenes where prototypes may struggle to separate overlapping instances, leading to "leaky" masks. There remains a roughly 6-point mAP gap between YOLACT and the best two-stage models, which the authors attribute largely to the performance of the underlying one-stage object detector. Future improvements in anchor handling and feature pyramids are expected to close this gap further.

Summary updated

BibTeX
@inproceedings{bolya2019yolact,
  author = {Daniel Bolya and Chong Zhou and Fanyi Xiao and Yong Jae Lee},
  title = {{YOLACT: Real-time Instance Segmentation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00925},
}
Figure