SwiftNet: Real-Time Video Object Segmentation

Haochen Wang, Xiaolong Jiang, Haibing Ren, Yao Hu, Song Bai

Abstract

In this work we present SwiftNet for real-time semi-supervised video object segmentation (one-shot VOS), which reports 77.8% J&F and 70 FPS on DAVIS 2017 validation dataset, leading all present solutions in overall accuracy and speed performance. We achieve this by elaborately compressing spatiotemporal redundancy in matching-based VOS via Pixel-Adaptive Memory (PAM). Temporally, PAM adaptively triggers memory updates on frames where objects display noteworthy inter-frame variations. Spatially, PAM selectively performs memory update and match on dynamic pixels while ignoring the static ones, significantly reducing redundant computations wasted on segmentation-relevant pixels. To promote efficient reference encoding, light-aggregation encoder is also introduced in SwiftNet deploying reversed sub-pixel. We hope SwiftNet could set a strong and efficient baseline for real-time VOS and facilitate its application in mobile vision.

Introduction

Semi-supervised Video Object Segmentation (one-shot VOS) is the task of tracking and segmenting a specific object throughout a video sequence, given only the initial mask in the first frame. Recent state-of-the-art approaches have shifted towards "matching-based" methods, such as STM, which utilize a memory bank of previous frames to guide the segmentation of the current "query" frame. While highly accurate, these methods suffer from high computational costs—typically $O(N^2)$ complexity relative to the number of pixels—making real-time performance on mobile devices challenging.

The primary bottleneck in these methods is spatiotemporal redundancy. In typical video sequences, many consecutive frames are visually similar, and within those frames, large regions (like the background) remain static. Processing these redundant elements leads to wasted computation. SwiftNet addresses this by introducing Pixel-Adaptive Memory (PAM) to eliminate such redundancies.

Methodology

SwiftNet streamlines the VOS pipeline through two core innovations: Pixel-Adaptive Memory (PAM) and the Light-Aggregation Encoder (LAE).

The SwiftNet architecture featuring Pixel-Adaptive Memory (PAM) and Light-Aggregation Encoder (LAE).

Pixel-Adaptive Memory (PAM)

PAM compresses redundancy across both temporal and spatial dimensions:

  • Temporal Redundancy (Variation-Aware Trigger): Instead of the standard practice of updating the memory bank at fixed intervals (e.g., every $n$ frames), PAM employs a trigger module. This module calculates inter-frame differences and only initiates a memory update when significant variations in the image or mask are detected.
  • Spatial Redundancy (Pixel-wise Update & Match): Rather than storing entire feature maps, PAM identifies "dynamic" pixels—those showing the most variation. Experimentally, the authors found that storing only the top 10% of these pixels results in negligible accuracy loss (~0.4% J&F) while significantly boosting speed. During the matching phase, the query frame only compares against this condensed set of informative pixels.

Light-Aggregation Encoder (LAE)

To further optimize performance, SwiftNet uses a Light-Aggregation Encoder for reference frames. It reuses features from the query encoder to avoid redundant backbone passes. Additionally, it utilizes reversed sub-pixel (RSP) operations—the inverse of sub-pixel convolution—to downsample masks efficiently while preserving spatial information for multi-scale feature fusion.

Key Results

The authors evaluated SwiftNet on standard benchmarks including DAVIS 2016/2017 and YouTube-VOS. The model was pre-trained on synthetic clips from MS-COCO and fine-tuned on video data.

Accuracy (J&F) vs. Speed (FPS) on the DAVIS 2017 validation set.

SwiftNet sets a new state-of-the-art for real-time VOS:

  • Efficiency: The ResNet-18 variant achieves 70 FPS with 77.8% J&F on DAVIS 2017, significantly outperforming previous fast methods like SAT-fast.
  • Accuracy: The ResNet-50 variant reaches 81.1% J&F at 25 FPS, approaching the accuracy of the much slower STM (81.8% J&F) while running four times faster.
  • Robustness: Qualitative analysis shows the model is highly resilient to fast motion, occlusions, and the presence of similar-looking distractors.

A key insight from the ablation studies is the "10% Rule": filtering for the most dynamic pixels not only saves computation but also acts as a "denoising" mechanism for the memory bank, focusing the model on the most relevant object evolution.

Conclusion

SwiftNet demonstrates that real-time, high-accuracy VOS is achievable by intelligently managing spatiotemporal redundancy. By focusing computation on dynamic pixels and frames, it achieves a superior speed-accuracy trade-off. Future work may explore learning the variation-aware trigger end-to-end and implementing more advanced memory management for long-term sequences, such as mechanisms for forgetting obsolete dynamic pixels.

Source code: https://github.com/haochenheheda/SwiftNet

Summary updated

BibTeX
@inproceedings{wang2021swiftnet,
  author = {Haochen Wang and Xiaolong Jiang and Haibing Ren and Yao Hu and Song Bai},
  title = {{SwiftNet: Real-Time Video Object Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=1E3Jw8aI1vm},
}
Figure