Memory Based Video Scene Parsing

Zhenchao Jin, Dongdong Yu, Kai Su, Zehuan Yuan, Changhu WangarXiv 2021

Abstract

Video scene parsing is a long-standing challenging task in computer vision, aiming to assign pre-defined semantic labels to pixels of all frames in a given video. Compared with image semantic segmentation, this task pays more attention on studying how to adopt the temporal information to obtain higher predictive accuracy. In this report, we introduce our solution for the 1st Video Scene Parsing in the Wild Challenge, which achieves a mIoU of 57.44 and obtained the 2nd place (team name: CharlesBLWX).

Introduction

Video scene parsing extends static image segmentation by requiring consistency across temporal sequences. While image-based models have advanced significantly, they often struggle with flickering and inconsistent predictions when applied to video frames independently. The primary challenge lies in effectively leveraging temporal information and global context to maintain semantic stability as objects move or lighting conditions change. This report details a memory-based approach that utilizes both dataset-wide class representations and frame-to-frame attention to address these issues.

Methodology

Our solution is built upon a high-performance foundation using the BEiT-Large transformer as the encoder and UperNet as the baseline decoder. To address the specific challenges of video data, we introduce two specialized decoder modules designed to capture global and temporal context.

Feature Memory Module (Decoder A)

Decoder A maintains a Feature Memory Module ($\mathcal{M}$) that stores representative features for every object category across the entire dataset. These "prototypes" are updated during training using a moving average. During inference, the model utilizes the predicted mask from the previous frame ($N-1$) to retrieve relevant class features from memory, which are then used to augment the current frame's representations. This allows the model to compare local pixels against a global "gold standard" for each class, helping resolve ambiguities caused by occlusions or poor lighting.

Temporal Memory Attention (Decoder B)

Decoder B incorporates a Temporal Memory Attention (TMA) module. Unlike the mask-based retrieval in Decoder A, the TMA module directly models temporal dependencies between features across frames, ensuring smoother transitions and better handling of object motion.

Architecture of the proposed framework featuring the Temporal Memory Attention (TMA) module and Feature Memory Module.

Multi-stage Inference and Ensemble

To further refine results, we employ a multi-stage inference strategy. Initial predictions are fed back into the model iteratively to re-index the memory and refine the segmentation masks. This "thinking twice" approach provides a measurable boost, with performance typically peaking after two stages of refinement. Finally, we ensemble the outputs of Decoder A and Decoder B to leverage their complementary strengths in global consistency and temporal attention.

Experiments and Results

We evaluated our approach on the Video Scene Parsing in the Wild (VSPW) dataset, a large-scale benchmark with dense semantic annotations. The BEiT backbone was pre-trained on ImageNet-22k and validated against benchmarks like ADE20K.

Ablation Study

Ablation studies on the VSPW validation set demonstrate the incremental value of each component. While the baseline BEiT-Large + UperNet achieved a mIoU of 60.02, the addition of Decoder A and Decoder B improved performance to 61.24 and 61.18, respectively. The final ensemble (A+B) reached a mIoU of 62.12, confirming that the two memory strategies are highly complementary.

Ablation study comparing the baseline UperNet with the proposed Decoder A, Decoder B, and their ensemble.

Challenge Performance

On the VSPW test set, our complete pipeline achieved a mIoU of 57.44, securing 2nd place in the 1st Video Scene Parsing in the Wild Challenge.

Conclusion

By integrating global class prototypes via a Feature Memory Module and modeling frame-to-frame dependencies with Temporal Memory Attention, our framework significantly improves the accuracy and consistency of video scene parsing. While the current multi-stage ensemble approach is optimized for competition performance, future work could focus on distilling these memory-based mechanisms into more computationally efficient architectures for real-time applications.

Summary updated

BibTeX
@misc{jin2021memory,
  author = {Zhenchao Jin and Dongdong Yu and Kai Su and Zehuan Yuan and Changhu Wang},
  title = {{Memory Based Video Scene Parsing}},
  year = {2021},
  eprint = {2109.00373},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.00373},
}
Figure