Dense Monocular Motion Segmentation Using Optical Flow and Pseudo Depth Map: A Zero-Shot Approach

Yuxiang Huang, Yuhao Chen, John S. ZelekarXiv 2024 · DOI

Introduction

Motion segmentation—the task of partitioning a video into regions with consistent motion—is a fundamental challenge in computer vision, particularly when the camera itself is moving. In these dynamic scenarios, two primary obstacles arise. First, motion parallax causes static objects at different depths to appear as if they are moving at different speeds relative to the camera, often misleading algorithms into identifying them as independently moving. Second, there is a significant data gap: supervised deep learning models require massive, manually annotated datasets, while traditional unsupervised methods often fail to capture high-level object semantics, leading to fragmented results.

Researchers from the University of Waterloo have developed a "zero-shot" pipeline that addresses these issues without requiring any training on motion-specific datasets. By combining optical flow with pseudo-depth maps derived from foundation models, their approach effectively disentangles camera-induced motion from true independent object motion.

Methodology: A Hybrid Pipeline

The proposed system leverages the power of pre-trained foundation models and classical geometric constraints to achieve dense segmentation.

Overview of the zero-shot motion segmentation pipeline: (a) input frame, (b) object proposals, (c) optical flow, (d) pseudo-depth map, (e) identified static regions, and (f) final motion segmentation.

The pipeline consists of several key stages:

  1. Automatic Object Proposals: The system identifies potential objects using a chain of models: the Recognize Anything Model (RAM) for tagging, Grounding-DINO for bounding box generation, and the Segment Anything Model (SAM) for precise mask creation. These masks are tracked across frames using DeAOT.
  2. Motion and Depth Cues: For each frame, the system computes optical flow (via PWC-Net) to track 2D pixel movement and a pseudo-depth map (via DINOv2) to estimate relative distances from the camera.
  3. Linearized Parametric Model: This core innovation linearizes the complex Longuet-Higgins and Pruzdny equations using pseudo-depth data. This allows the system to distinguish between apparent motion caused by parallax and actual independent motion.
  4. Spectral Clustering: Finally, a motion similarity matrix is constructed, and spectral clustering groups the object proposals into distinct motion categories.

Key Insights

  • Depth as the Missing Link: Optical flow alone is ambiguous in 3D scenes. By treating depth as a first-class citizen in the motion equation, the model can "subtract" the effects of camera movement and parallax.
  • Foundation Models as Priors: The work demonstrates that general-purpose models (like SAM for segmentation and DINOv2 for features) are now mature enough to be used as robust components in complex downstream tasks without further fine-tuning.
  • Object-Level Reasoning: By clustering entire object proposals rather than individual pixels, the method avoids "over-segmentation," ensuring that different parts of the same moving object (e.g., a person's limbs) are grouped correctly.

Results and Evaluation

The method was evaluated on two challenging benchmarks: DAVIS-Moving and YTVOS-Moving, which focus on scenarios with moving cameras and diverse object classes.

The "zero-shot" approach demonstrated significant performance gains:

  • Outperforming Unsupervised Methods: On the DAVIS-Moving dataset, the method achieved an F-score of 75.96, significantly higher than the state-of-the-art unsupervised EM-based method (68.90).
  • Competitive with Supervised Models: Despite having no training on the task, it closely matched the performance of MoSeg, a fully supervised model that scored 78.10 on DAVIS-Moving.
  • Qualitative Robustness: Qualitative results show the model successfully segments moving objects, such as cyclists or animals, in scenes where optical flow alone would fail due to background parallax.

Conclusion and Future Directions

While the pipeline achieves impressive accuracy, it currently faces limitations in inference speed due to the reliance on multiple large-scale models. Additionally, the current version requires a predefined number of motion clusters.

Future work will focus on automating cluster selection and integrating further geometric constraints, such as the fundamental matrix and keypoint correspondences, to enhance robustness against more complex camera trajectories. This research paves the way for more flexible, training-free motion analysis in real-world dynamic environments.

Summary updated

BibTeX
@misc{huang2024dense,
  author = {Yuxiang Huang and Yuhao Chen and John S. Zelek},
  title = {{Dense Monocular Motion Segmentation Using Optical Flow and Pseudo Depth Map: A Zero-Shot Approach}},
  year = {2024},
  eprint = {2406.18837},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.18837},
}
Figure