Mask Propagation for Efficient Video Semantic Segmentation

Yuetian Weng, Mingfei Han, Haoyu He, Mingjie Li, Lina Yao, Xiaojun Chang, Bohan Zhuang

Introduction

Video Semantic Segmentation (VSS)—the task of assigning a semantic label to every pixel in every frame of a video—is a cornerstone of computer vision applications ranging from autonomous driving to video editing. However, the computational cost of VSS remains a significant barrier to real-time deployment. While image segmentation models like Mask2Former have achieved remarkable accuracy, applying these heavy architectures to every frame in a high-resolution video is computationally prohibitive. For instance, processing a standard 30-frame clip with a top-tier segmentor can exceed 20 trillion floating-point operations (FLOPs).

The primary source of this inefficiency is temporal redundancy. Consecutive video frames are highly correlated; objects typically move incrementally between frames. Previous attempts to exploit this redundancy often relied on pixel-level optical flow to warp features. However, pixel-wise flow is frequently noisy and fails to capture the cohesive movement of entire objects. This paper introduces MPVSS (Mask Propagation for Video Semantic Segmentation), a framework that shifts the focus from pixel-level warping to segment-level propagation, achieving a 4x reduction in computational overhead.

The MPVSS Framework

MPVSS optimizes video processing by dividing a sequence into key frames and non-key frames. Key frames are processed using a high-capacity segmentor, while non-key frames are handled via a lightweight propagation mechanism.

1. Key Frame Processing

For sparse key frames (e.g., every 5th frame), the system employs a full Mask2Former model. This stage generates a set of "queries"—mathematical representations that encode the identity and spatial characteristics of specific objects or regions—alongside their corresponding binary masks and class labels.

2. Query-Based Flow Estimation

The core innovation of MPVSS is the query-based flow estimation. Unlike traditional methods that calculate a single global optical flow map for the entire frame, MPVSS leverages the learned queries from the key frame to generate segment-aware flow maps. Because each query is associated with a specific object, the model can predict distinct motion cues for different entities. For example, if a pedestrian moves left while a car moves right, the model generates independent flow maps tailored to the trajectory of each object.

3. Mask Warping and Refinement

These segment-specific flow maps are used to warp the high-quality masks from the key frame onto subsequent non-key frames. By reusing the class predictions and masks, the framework avoids the need to run heavy image encoders and transformer decoders on the majority of frames. To maintain boundary precision, the query-based flow is integrated with a lightweight pixel-wise flow module, ensuring that object edges remain sharp despite complex motion.

Experimental Evaluation

The authors evaluated MPVSS on two primary benchmarks: VSPW (Video Scene Parsing in the Wild), a large-scale dataset with 124 categories, and Cityscapes, the standard for urban autonomous driving.

Performance and Efficiency

MPVSS demonstrates a superior balance between accuracy and computational efficiency:

  • State-of-the-Art Accuracy: On the VSPW dataset, MPVSS using a Swin-L backbone outperformed the previous state-of-the-art (MRCFA) by 4.0% mIoU.
  • Computational Savings: Despite the accuracy gains, MPVSS required only 26% of the FLOPs used by MRCFA. Compared to a per-frame Mask2Former baseline, MPVSS reduced computational costs by 4x with a negligible (~2%) impact on accuracy.
  • Temporal Consistency: The method achieved high Video Consistency (VC) scores. By propagating masks rather than re-segmenting every frame, the model significantly reduces the "flickering" artifacts common in per-frame methods, which is vital for stable real-world applications.

Discussion and Insights

The success of MPVSS stems from the insight that segments move cohesively. Traditional optical flow treats pixels as independent agents, making it susceptible to noise. MPVSS recognizes that pixels belonging to the same semantic object move together. By using queries as "handles" for tracking, the model decouples the "heavy" task of object identification from the "light" task of motion tracking.

Limitations

Despite its efficiency, the framework has some trade-offs:

  • Parameter Count: While the model saves FLOPs (computation), the addition of the flow module increases the total number of model parameters.
  • Training Complexity: The flow module requires specific training and hyperparameter tuning to achieve optimal propagation.
  • Semantic Ambiguity: The model occasionally experiences "semantic confusion" between highly similar categories (e.g., "Sea" vs. "Water") during the propagation phase.

Conclusion

MPVSS represents a significant step toward efficient video understanding. By moving from pixel-level flow to segment-level propagation via object queries, the framework achieves substantial speedups without sacrificing the intelligence of modern transformer-based segmentors. Future work may extend this mask propagation logic to other dense video tasks, such as instance segmentation and video object segmentation.

Summary updated

BibTeX
@inproceedings{weng2023mask,
  author = {Yuetian Weng and Mingfei Han and Haoyu He and Mingjie Li and Lina Yao and Xiaojun Chang and Bohan Zhuang},
  title = {{Mask Propagation for Efficient Video Semantic Segmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=6ljXBlojde},
}
Figure