Abstract: We find Mask2Former also achieves state-of-the-art performance on video instance segmentation without modifying the architecture, the loss or even the training pipeline. In this report, we show universal image segmentation architectures trivially generalize to video segmentation by directly predicting 3D segmentation volumes. Specifically, Mask2Former sets a new state-of-the-art of 60.4 AP on YouTubeVIS-2019 and 52.6 AP on YouTubeVIS-2021. We believe Mask2Former is also capable of handling video semantic and panoptic segmentation, given its versatility in image segmentation. We hope this will make state-of-the-art video segmentation research more accessible and bring more attention to designing universal image and video segmentation architectures.
Introduction
Video Instance Segmentation (VIS) requires the simultaneous detection, segmentation, and tracking of object instances across video frames. Traditionally, research in this field has been divided into two paradigms: online methods that perform per-frame segmentation followed by post-hoc tracking, and offline methods that process short clips as a single unit. However, many offline models rely on specialized Transformer designs (such as VisTR or SeqFormer) that are distinct from standard image models.
This work addresses the historical disconnect between image and video segmentation research. The authors demonstrate that Mask2Former—a "universal" architecture originally designed for static image segmentation—can dominate VIS benchmarks with virtually no changes to its core design.
Methods
The researchers adapt the original Mask2Former architecture to video by treating a video clip as a 3D spatio-temporal volume. Three minimal, intuitive adjustments are made to the framework:
- 3D Spatio-temporal Masked Attention: The Transformer decoder's masked attention mechanism is extended from 2D to 3D. Queries now attend to features across all frames in a clip simultaneously, allowing the model to capture temporal context.
- Temporal Positional Encoding: To help the model understand the sequence of time, non-parametric sinusoidal temporal positional encodings are added, decoupled from spatial encodings.
- 3D Mask Prediction: Instead of predicting a 2D mask, the model produces a 3D volume ($T \times H \times W$) for each object instance. This is achieved via a simple dot product between the query embeddings and the spatio-temporal pixel embeddings.
Crucially, the loss functions and training pipeline remain identical to the image-based version of Mask2Former. By using a consistent set of "object queries" for an entire video clip, the model naturally tracks objects without requiring explicit re-identification or matching modules.
Key Results
Mask2Former was evaluated on the primary benchmarks for video instance segmentation: YouTubeVIS-2019 and YouTubeVIS-2021. The model established a new state-of-the-art (SOTA) across both datasets.
On YouTubeVIS-2019, Mask2Former achieved 60.4 AP using a Swin-L backbone, significantly outperforming previous specialized models like SeqFormer (59.3 AP). Even with a standard ResNet-50 backbone, it achieved 46.4 AP, demonstrating the inherent strength of the architecture regardless of the backbone scale.
On the more challenging YouTubeVIS-2021 benchmark, which features more categories and longer videos, Mask2Former achieved 52.6 AP, again setting a new record. The model also proved efficient; a ResNet-50 version can be trained in approximately 2 hours on 8 V100 GPUs.
Discussion and Limitations
While Mask2Former demonstrates that universality is achievable, processing video as a 3D volume is memory-intensive. For high-performing Swin-L models, the authors reduced the input resolution to fit the data into GPU memory. Furthermore, because the model processes clips as a whole, it is inherently an "offline" or "near-online" method. Adapting this architecture to true real-time, long-form streaming video remains an area for future exploration.
In conclusion, Mask2Former proves that a well-designed mask classification architecture is flexible enough to handle the temporal dimension as just another axis in a 3D volume, simplifying the path toward universal image and video segmentation models.
Summary updated