MAIN: Multi-Attention Instance Network for Video Segmentation

Juan Leon Alcazar, María Alejandra Bravo, Ali K. Thabet, Guillaume Jeanneret, Thomas Brox, Pablo Arbelaez, Bernard GhanemCVIU 2019 · DOI

Abstract

Video Object Segmentation (VOS) has traditionally faced a trade-off between accuracy and computational efficiency. High-performing models often rely on "online fine-tuning"—a process where the network is updated for each specific video sequence—rendering them unsuitable for real-time applications. This paper presents the Multi-Attention Instance Network (MAIN), a novel architecture designed for multi-instance video segmentation that operates entirely offline. By integrating long-term tracking and short-term motion cues within a unified encoder-decoder framework, MAIN achieves state-of-the-art results on major benchmarks while maintaining a real-time processing speed of 30.3 FPS.

Introduction

The goal of semi-supervised Video Object Segmentation is to track and mask specific objects throughout a video sequence, given an initial mask in the first frame. While binary segmentation (tracking a single object) has seen significant progress, multi-instance segmentation—where multiple distinct objects must be tracked simultaneously—remains a complex challenge.

Existing top-tier methods typically employ online learning to adapt to the appearance of specific objects in a video. However, this adaptation is computationally expensive, often taking seconds or even minutes per frame, which is prohibitive for real-time use cases. MAIN addresses this by utilizing generic spatio-temporal cues that allow the model to generalize across different videos without any per-sequence parameter updates.

Methodology

MAIN is built upon a single encoder-decoder architecture that processes multiple instances in a single forward pass. The core innovation lies in its multi-faceted approach to feature attention and loss calculation.

Multi-Attention Priors

To provide the network with a comprehensive understanding of the scene, MAIN utilizes four distinct input streams:

  1. RGB Image: Provides static visual features such as color, texture, and shape.
  2. Unit Optical Flow (uOF): Instead of raw optical flow, the authors use a normalized version (bounded between -1 and 1). This provides stable motion cues that help the network distinguish moving objects from the background.
  3. Long-Term Attention (LTA): This stream incorporates bounding boxes generated by a fast, external tracker. LTA provides a rough spatial "prior," ensuring the model stays focused on the correct region even during long-term occlusions.
  4. Short-Term Attention (STA): The segmentation mask from the previous frame is warped forward using optical flow to predict the current position. This provides the fine-grained detail necessary for sharp object boundaries.

Weighted Instance Dice (WID) Loss

Standard loss functions often struggle with the class imbalance inherent in VOS (e.g., a small object against a large background). MAIN introduces Weighted Instance Dice (WID) loss, which independently weights each pixel prediction based on the size of the instance. Furthermore, WID loss includes a specific penalty for overlapping predictions, which is crucial for maintaining the identity of distinct objects when they touch or cross paths.

Efficient Architecture

To maintain high throughput, the decoder utilizes multi-scale separable dilated convolutions. This design allows the network to maintain a large receptive field—capturing broad context—without the heavy computational overhead associated with standard large-filter convolutions.

Experiments and Results

The researchers evaluated MAIN on two primary benchmarks: YouTube-VOS, the largest dataset for multi-object segmentation, and DAVIS-17, known for its high-quality annotations and temporal complexity.

Performance and Speed

MAIN achieves a processing speed of 30.3 FPS, placing it among the fastest high-performance models available. In terms of accuracy, the model shows significant improvements over previous offline methods. On the YouTube-VOS benchmark, MAIN improved the Jaccard index (region similarity) by 6.8% and the F-Metric (contour accuracy) by 12.7% for "unseen" categories—objects not present in the training set. This demonstrates the model's robust generalization capabilities.

Training Strategies

The authors found that "Instance Shuffling" was critical for success. By randomly shuffling the order of instances during training, they prevented the network from memorizing specific channel assignments, forcing it to learn the underlying relationship between the attention cues and the resulting masks.

Discussion and Limitations

While MAIN represents a significant step forward for offline VOS, certain challenges remain. The model can struggle with extreme scale changes, where objects move too quickly or shrink too much for the attention priors to remain accurate. Additionally, label mixing can occur when two visually identical objects overlap for extended periods, leading the model to occasionally swap their identities. Finally, while the boundaries are generally sharp, very thin structures (such as the legs of an animal) can sometimes be lost in the segmentation.

Conclusion

MAIN demonstrates that online fine-tuning is not a prerequisite for high-quality video object segmentation. By effectively fusing long-term tracking and short-term motion cues, MAIN provides a real-time, multi-instance solution that generalizes well to unseen objects. This architecture paves the way for more efficient video analysis tools in fields ranging from automated surveillance to mobile video editing.

Summary updated

BibTeX
@article{alcazar2019main,
  author = {Juan Leon Alcazar and María Alejandra Bravo and Ali K. Thabet and Guillaume Jeanneret and Thomas Brox and Pablo Arbelaez and Bernard Ghanem},
  title = {{MAIN: Multi-Attention Instance Network for Video Segmentation}},
  journal = {Comput. Vis. Image Underst.},
  year = {2019},
  doi = {10.1016/j.cviu.2021.103240},
}
Figure