YOLACT++: Better 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 (>30 fps) instance segmentation that achieves competitive results on MS COCO evaluated on a single Titan Xp, which is significantly faster than any previous state-of-the-art 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. We also propose Fast NMS, a drop-in 12 ms faster replacement for standard NMS that only has a marginal performance penalty. Finally, by incorporating deformable convolutions into the backbone network, optimizing the prediction head with better anchor scales and aspect ratios, and adding a novel fast mask re-scoring branch, our YOLACT++ model can achieve 34.1 mAP on MS COCO at 33.5 fps, which is fairly close to the state-of-the-art approaches while still running at real-time.

Introduction

Instance segmentation is a challenging computer vision task that requires identifying every pixel belonging to every individual object in an image. While object detection (bounding boxes) has reached real-time speeds, instance segmentation has traditionally been much slower. Standard high-performing models like Mask R-CNN are "two-stage" and inherently sequential: they first detect a bounding box and then "re-pool" features from that box to predict a mask. This re-pooling step is computationally expensive and difficult to parallelize, making it nearly impossible to reach the 30 frames-per-second (FPS) threshold required for real-time applications like robotics or autonomous driving.

Previous "one-stage" attempts often sacrificed significant accuracy or required heavy post-processing that negated their speed advantages. YOLACT++ addresses this by rethinking the mask generation process to maximize parallelism.

Proposed Method

The core innovation of YOLACT (You Only Look At CoefficienTs) is the decomposition of instance segmentation into two parallel tasks that are merged at the final stage of the pipeline.

The YOLACT architecture decomposes instance segmentation into parallel prototype generation and coefficient prediction branches.

Parallel Subtasks

  1. Prototype Generation (Protonet): This branch predicts a set of $k$ "prototype masks" for the entire image. These are not specific to any one object but rather serve as global maps of potential features.
  2. Mask Coefficients: Simultaneously, the object detection head predicts a vector of "mask coefficients" for each detected instance.

The Assembly: To produce the final mask, the model performs a simple linear combination of the prototypes using the predicted coefficients ($M = \sigma(P C^T)$). Because this operation is a matrix multiplication, it is highly optimized for GPU execution, adding minimal overhead to the detection process.

The "++" Enhancements

YOLACT++ introduces several key refinements to the original architecture:

  • Deformable Convolutions: By replacing standard convolutions in the backbone with deformable ones, the model can better sample features from objects of varying shapes and rotations, significantly improving feature representation.
  • Optimized Prediction Head: The authors tuned anchor scales and aspect ratios to increase object recall, ensuring better coverage of diverse object sizes.
  • Fast Mask Re-Scoring: A small branch predicts the Intersection over Union (IoU) of the mask, allowing the model to prioritize high-quality segmentations during evaluation.
  • Fast NMS: A parallelized version of Non-Maximum Suppression that is approximately 12ms faster than traditional sequential NMS, further reducing the latency bottleneck.

Key Results

Evaluated on the MS COCO dataset, YOLACT++ demonstrates a superior trade-off between speed and accuracy compared to previous methods.

Comparison of Mask mAP vs. FPS on MS COCO, highlighting YOLACT++'s real-time performance.
  • Real-Time Performance: YOLACT++ achieves 33.5 FPS on a single Titan Xp, crossing the critical 30 FPS real-time threshold.
  • Competitive Accuracy: It reaches 34.1 mAP on MS COCO. While slightly behind the absolute best two-stage models (which typically run at 8-13 FPS), it is significantly more accurate than any other real-time competitor.
  • Efficiency: The model is lightweight, requiring only ~1500 MB of VRAM, making it accessible for deployment on a single GPU.

Insights and Discussion

A key finding of the paper is the emergent behavior of the prototypes. Despite being fully convolutional and theoretically translation-invariant, the network learns to localize specific objects by utilizing zero-padding at the image edges as a coordinate system. By "feeling" the distance from the edges, prototypes learn to activate only in specific regions of the image.

Furthermore, because YOLACT++ uses the full resolution of the feature map rather than re-pooled, cropped features, its masks for large objects are often cleaner and follow boundaries more precisely than those produced by Mask R-CNN.

Conclusion and Limitations

YOLACT++ represents a significant step forward in real-time instance segmentation. However, some limitations remain. In crowded scenes with many overlapping objects of the same class, the model may struggle to generate enough distinct prototypes, leading to localization failures where a single mask covers multiple objects. Additionally, if the predicted bounding box is poorly localized, the final mask can "leak" outside the actual object boundaries. Future work will likely focus on improving the underlying object detector to close the remaining performance gap with two-stage models.

Summary updated

BibTeX
@article{bolya2019yolact,
  author = {Daniel Bolya and Chong Zhou and Fanyi Xiao and Yong Jae Lee},
  title = {{YOLACT++: Better Real-time Instance Segmentation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2019},
  doi = {10.1109/tpami.2020.3014297},
}
Figure