Abstract
Video semantic segmentation (VSS) plays a vital role in understanding the temporal evolution of scenes. Traditional methods often segment videos frame-by-frame or in a short temporal window, leading to limited temporal context, redundant computations, and heavy memory requirements. To this end, we introduce a Temporal Video State Space Sharing (TV3S) architecture to leverage Mamba state space models for temporal feature sharing. Our model features a selective gating mechanism that efficiently propagates relevant information across video frames, eliminating the need for a memory-heavy feature pool. By processing spatial patches independently and incorporating shifted operation, TV3S supports highly parallel computation in both training and inference stages, which reduces the delay in sequential state space processing and improves the scalability for long video sequences. Moreover, TV3S incorporates information from prior frames during inference, achieving long-range temporal coherence and superior adaptability to extended sequences. Evaluations on the VSPW and Cityscapes datasets reveal that our approach outperforms current state-of-the-art methods, establishing a new standard for VSS with consistent results across long video sequences.
Introduction
Video Semantic Segmentation (VSS) is a critical task for applications like autonomous driving and video editing, where understanding scene evolution over time is paramount. However, current approaches face a "trilemma" of challenges: Optical Flow methods are computationally expensive and struggle with occlusions; Recurrent Neural Networks (RNNs) are inherently sequential, making them slow to train and difficult to scale; and Transformers offer great global context but suffer from quadratic complexity ($O(N^2)$), leading to massive memory requirements for long video sequences.
To address these limitations, we present TV3S (Temporal Video State Space Sharing), a new architecture that leverages Mamba-based State Space Models (SSMs) to share temporal information across frames efficiently. TV3S achieves state-of-the-art accuracy and temporal consistency with linear complexity and significantly lower computational overhead than Transformer-based models.
Methodology
The core innovation of TV3S is the integration of Mamba (S6)—a hardware-aware State Space Model—into a VSS framework to enable efficient temporal feature sharing.
Temporal State Space (TSS) Module
Instead of a global attention mechanism, the model uses TSS modules to propagate information. It treats each spatial patch of a video frame as a sequence over time. Each patch location maintains its own "hidden state" ($H$) that is updated frame-by-frame, effectively "remembering" the past without needing a massive, memory-intensive feature pool.
Parallelism and Shifted Windows
To overcome the sequential bottleneck of standard SSMs, TV3S splits encoded frames into discrete patches. These patches are processed independently and in parallel. Borrowing from Swin Transformers, a shifted window mechanism is introduced. By alternating between regular and shifted patch partitions, the model captures motion and context that crosses patch boundaries, preventing "grid" artifacts.
Results and Discussion
TV3S was evaluated on the VSPW (Video Scene Parsing in the Wild) and Cityscapes benchmarks, demonstrating a superior balance of accuracy, speed, and efficiency.
- Accuracy: On VSPW, TV3S with a MiT-B1 backbone achieved 40.0 mIoU, outperforming established models like CFFM (38.5) and MRCFA (38.9).
- Efficiency: TV3S-MiT-B2 requires only 53.9 GFLOPs, compared to CFFM-MiT-B2’s 143.2 GFLOPs, representing a massive reduction in computational cost for better performance.
- Temporal Consistency: The model achieved higher mean Video Consistency (mVC) scores, meaning the segmentation masks are smoother and flicker less over time compared to frame-by-frame baselines.
Conclusion
TV3S demonstrates that state space sharing is a powerful paradigm for video semantic segmentation. By achieving linear scaling and high parallelism, it overcomes the limitations of previous RNN and Transformer-based methods. While performance gains tend to plateau after a certain temporal window (around 32 frames), the model's efficiency and consistency make it highly suitable for real-world video analysis. Future work will explore extending this architecture to other video-based tasks such as object detection and action recognition.
Summary updated