Abstract
Video instance segmentation (VIS) is the task that requires simultaneously classifying, segmenting and tracking object instances of interest in video. Recent methods typically develop sophisticated pipelines to tackle this task. Here, we propose a new video instance segmentation framework built upon Transformers, termed VisTR, which views the VIS task as a direct end-to-end parallel sequence decoding/prediction problem. Given a video clip consisting of multiple image frames as input, VisTR outputs the sequence of masks for each instance in the video in order directly. At the core is a new, effective instance sequence matching and segmentation strategy, which supervises and segments instances at the sequence level as a whole. VisTR frames the instance segmentation and tracking in the same perspective of similarity learning, thus considerably simplifying the overall pipeline. Without bells and whistles, VisTR achieves the highest speed among all existing VIS models and achieves competitive results on the YouTube-VIS dataset.
Introduction
Video Instance Segmentation (VIS) is a challenging computer vision task that requires a model to simultaneously classify, segment, and track every object instance across a video sequence. Traditionally, this has been handled in a fragmented way. "Top-down" methods perform segmentation on individual frames and then use human-designed rules to "stitch" instances together (tracking-by-detection). "Bottom-up" methods try to cluster pixel embeddings across space and time, which is often slow and computationally expensive.
The authors of VisTR argue that these sophisticated pipelines are unnecessarily complex. They propose that segmentation (pixel-level similarity) and tracking (instance-level similarity) are fundamentally the same problem—similarity learning—and should be solved in a single, unified framework. By treating VIS as a direct sequence-to-sequence prediction problem, VisTR eliminates the need for complex hand-crafted tracking rules.
The VisTR Framework
VisTR (Video Instance Segmentation TRansformer) adapts the architecture of DETR (DEtection TRansformer) for the temporal domain. The pipeline consists of four main components designed to process video clips as a unified sequence.
- CNN Backbone: Extracts feature maps from a sequence of input images.
- Transformer Encoder: Models the similarities between all pixels across all frames in the clip. Crucially, it uses 3D positional encodings (spatial + temporal) to help the model understand where and when a pixel exists within the video volume.
- Transformer Decoder: Uses a set of learned "instance queries" to probe the encoder's features. If the model predicts $n$ objects per frame for $T$ frames, it uses $N = n \times T$ queries. The decoder outputs a sequence of predictions where the $i$-th prediction in every frame corresponds to the same instance, making tracking "automatic."
- Instance Sequence Segmentation Module: This module takes the decoder's output and uses 3D convolutions to accumulate mask features across the temporal dimension. This ensures that the segmented masks are temporally consistent.
The model is trained using a bipartite matching loss (via the Hungarian algorithm), comparing the predicted sequence of masks and boxes for an instance against the ground truth sequence.
Key Insights and Ideas
- Tracking for Free: Because the Transformer decoder outputs predictions in a fixed order, the model doesn't need a separate tracking branch. The instance at index $k$ in frame 1 is implicitly the same instance at index $k$ in frame 2.
- The Power of 3D Convolutions: While the Transformer handles global relations, the authors found that adding 3D convolutions in the segmentation head was vital. It allows the model to "smooth" masks over time, helping it handle challenging scenarios like motion blur or partial occlusions.
- Sequence-Level Supervision: Instead of supervising frame-by-frame, VisTR supervises the entire "instance sequence" as a single unit. This forces the model to learn features that are robust across the entire duration of the video clip.
- Positional Encoding is Essential: Ablation studies show that without explicit 3D positional encoding, performance drops significantly (from 33.3% to 28.4% AP), proving that the Transformer needs a "map" of the video's spatio-temporal structure.
Experimental Results
The model was evaluated on the YouTube-VIS dataset, the standard benchmark for this task, containing 40 object categories across thousands of video clips.
Quantitative Performance
VisTR stands out for its efficiency. Using a ResNet-101 backbone, it achieves 57.7 FPS, making it the fastest model in its class and significantly faster than previous state-of-the-art methods like MaskProp. In terms of accuracy, VisTR achieved 38.6% mask mAP on the validation set, outperforming other single-model frameworks like MaskTrack R-CNN (30.3% AP) and STEm-Seg (34.6% AP).
Qualitative Success
Qualitative results of VisTR on the YouTube-VIS dataset, demonstrating robust tracking and segmentation. Source, p. 8
As shown in the qualitative results, the model demonstrates a high level of robustness in tracking instances through overlaps, relative position changes, and varying poses, such as a person performing a complex skateboard trick or animals interacting in a natural environment.
Conclusion and Future Work
VisTR demonstrates that a simpler, end-to-end Transformer-based approach can achieve competitive accuracy with superior speed in video instance segmentation. While currently limited by memory constraints for very long video clips (requiring a sliding window approach), the framework provides a strong foundation for future video understanding tasks. Integrating standard performance boosters like Feature Pyramid Networks (FPN) or multi-scale features could likely push the accuracy even higher in future iterations.
Summary updated