Improved Cross-view Completion Pre-training for Stereo Matching

Philippe Weinzaepfel, Vaibhav Arora, Yohann Cabon, Thomas Lucas, Romain Brégier, Vincent Leroy, Gabriela Csurka, Leonid Antsfeld, Boris Chidlovskii, Jérôme Revaud · DOI

TL;DR

This paper introduces CroCo v2, a self-supervised pre-training method that significantly improves performance on dense geometric vision tasks like stereo matching and optical flow. By leveraging real-world image pairs, relative positional embeddings, and scaled-up Vision Transformers, CroCo v2 achieves state-of-the-art results without relying on traditional task-specific architectures.

What Problem Does This Paper Address?

While self-supervised learning has excelled at high-level vision tasks (like image classification), it has struggled to match supervised performance on dense geometric tasks such as stereo matching (estimating depth from two images) and optical flow (estimating motion between consecutive frames). Existing self-supervised methods, like masked image modeling (MIM), have limitations when applied to these tasks. Specifically, the original cross-view completion (CroCo) framework, which uses a second view to aid reconstruction, was primarily tested on synthetic data and used standard Vision Transformers (ViTs) with absolute positional embeddings, hindering generalization to varying image resolutions. This paper aims to overcome these limitations to enable effective self-supervised pre-training for dense geometric vision.

Methods

CroCo v2 builds upon the cross-view completion (CroCo) framework by introducing three key improvements:

  • Scalable Real-World Data Collection: The authors developed a method to collect millions of real-world image pairs suitable for pre-training. This involves carefully controlling visual overlap and viewpoint differences, leveraging existing 3D information (meshes, point clouds, SfM reconstructions) from datasets like ARKitScenes, MegaDepth, and 3D Street View.
  • Relative Positional Embeddings (RoPE): Instead of absolute positional embeddings, which struggle with varying image sizes, CroCo v2 employs Rotary Positional Embeddings (RoPE). RoPE injects relative positional information into the attention mechanism, allowing the model to generalize better to different resolutions and crops.
  • Scaled-Up Architectures: The paper scales up the Vision Transformer architecture, using larger encoders and decoders. This is made possible by the availability of large-scale, diverse real-world pre-training data.

The pre-training task involves masking a significant portion (90%) of tokens in one image and reconstructing them using information from a second, related image of the same scene. This forces the model to implicitly learn about scene geometry and spatial relationships. For downstream tasks, the pre-trained encoder is finetuned with a Dense Prediction Transformer (DPT) head for stereo matching and optical flow.

Datasets

The paper utilizes a combination of synthetic and real-world datasets:

  • Pre-training Data:
    • Synthetic: Habitat simulator data (used in the original CroCo).
  • Real-world: ARKitScenes, MegaDepth, 3D Street View, and Indoor Visual Localization datasets.
  • Downstream Task Evaluation Data:
    • Stereo Matching: Middlebury (v3, 21, 14, 06, 05), ETH3D, KITTI 2015, Spring, CREStereo, SceneFlow.
  • Optical Flow: MPI-Sintel, KITTI 2015, Spring, FlyingChairs, FlyingThings, TartanAir.

Key Insights and Ideas

  • Real-world data is crucial for geometric tasks: Relying solely on synthetic data limits the generalization capabilities of self-supervised models for dense geometric tasks.
  • Relative positional embeddings are key for ViTs in dense vision: RoPE significantly improves the performance and generalization of ViTs on tasks like stereo matching and optical flow, which are sensitive to relative spatial information.
  • Scaling up works: With sufficient diverse data and appropriate architectural choices (like RoPE), scaling up Vision Transformers leads to substantial performance gains in self-supervised pre-training for geometric tasks.
  • Towards universal vision models: By achieving state-of-the-art results without task-specific components (like correlation volumes), CroCo v2 demonstrates the potential for a single, generic architecture to excel across multiple dense vision tasks.

Key Results

  • CroCo v2 achieves state-of-the-art results on multiple stereo matching benchmarks (Middlebury, KITTI 2015, ETH3D, Spring) and optical flow benchmarks (MPI-Sintel, KITTI 2015, Spring).
  • The improvements over the original CroCo are substantial, e.g., reducing the "[email protected]" error on Middlebury from 26.3% to 15.5% and the EPE on MPI-Sintel from 2.07 to 1.43.
  • The method demonstrates strong performance even when finetuned on smaller datasets, highlighting the effectiveness of the pre-training.
  • Qualitative results show significantly sharper and more accurate reconstructions compared to the original CroCo, especially on unseen real-world scenes.
  • The proposed Laplacian loss, which incorporates uncertainty estimation, outperforms standard L1 loss and aids in merging tiled predictions.

Limitations and Future Work

  • Tiling-based inference: For very large disparity or flow values, pixels might fall outside the corresponding tile, leading to inaccurate estimates. The authors experimented with a slightly shifted second tile but found it unsatisfactory due to increased computation. They hope to find better tiling strategies.
  • Computational cost: While achieving state-of-the-art results, the scaled-up models have a significantly higher number of parameters compared to existing task-specific methods. The paper acknowledges that task-specific approaches can be more sample-efficient due to prior knowledge.
  • Future work: The authors suggest exploring better tiling strategies for inference and continuing the pursuit of universal vision models that can handle a wide range of tasks with a single architecture.

Summary updated

BibTeX
@inproceedings{weinzaepfel2023improved,
  author = {Philippe Weinzaepfel and Vaibhav Arora and Yohann Cabon and Thomas Lucas and Romain Brégier and Vincent Leroy and Gabriela Csurka and Leonid Antsfeld and Boris Chidlovskii and Jérôme Revaud},
  title = {{Improved Cross-view Completion Pre-training for Stereo Matching}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.01647},
}
Figure