CroCo v2: Improved Cross-view Completion Pre-training for Stereo Matching and Optical Flow

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

Introduction

Self-supervised learning (SSL) has transformed high-level vision tasks, yet its application to dense geometric tasks like stereo matching and optical flow has remained challenging. Traditional SSL methods often focus on instance discrimination, which fails to capture the intricate 3D structural relationships necessary for pixel-level correspondence. CroCo v2 addresses these limitations by scaling "cross-view completion" pre-training, demonstrating that a generic Vision Transformer (ViT) can outperform specialized architectures that rely on task-specific priors like cost volumes.

Methodology: Cross-View Completion at Scale

The core of CroCo v2 is the cross-view completion pretext task. The model receives two views of the same scene; 90% of the first image is masked, requiring the model to reconstruct it using the remaining 10% and the full second view. This setup forces the network to learn geometric correspondences between camera views to succeed at reconstruction.

CroCo v2 architecture highlighting the transition to larger encoders/decoders and the integration of Rotary Positional Embeddings (RoPE).

Key technical advancements in v2 include:

  • Rotary Positional Embeddings (RoPE): Replacing absolute positional embeddings with RoPE allows the model to focus on relative distances between patches. This makes the model robust across varying image resolutions and cropping strategies.
  • Architectural Scaling: The authors scaled the model to a ViT-Large encoder and a significantly larger transformer decoder to facilitate better information fusion between views.
  • Probabilistic Finetuning: During finetuning, the model predicts a Laplacian distribution (value and uncertainty). This uncertainty is used to intelligently merge predictions when processing large images using overlapping tiles.

Data Strategy

Performance in geometric tasks is heavily dependent on data diversity. CroCo v2 leverages a massive dataset of 5.3 million real-world image pairs sourced from ARKitScenes, MegaDepth, 3DStreetView, and IndoorVL. These pairs were curated using Structure-from-Motion (SfM) data to ensure sufficient visual overlap. This real-world data is supplemented by 2 million synthetic pairs from the Habitat simulator.

Results and Performance

CroCo v2 achieves state-of-the-art results across multiple benchmarks without the need for hand-crafted geometric priors like iterative refinement or multi-scale pyramids.

Qualitative results of CroCo-Stereo on Middlebury and other benchmarks, showing high-fidelity disparity maps compared to ground truth and previous methods.
  • Stereo Matching: On the KITTI 2015 benchmark, the model reached a D1-all error of 1.59%, outperforming specialized models like CREStereo. On ETH3D, it set a new state-of-the-art for the [email protected] metric (3.27%).
  • Optical Flow: The model achieved an End-Point Error (EPE) of 1.09 on MPI-Sintel (clean), ranking among the top-performing methods at the time of publication.
  • Ablation Insights: The move from absolute to relative embeddings (RoPE) alone improved Middlebury stereo error from 26.3% to 25.3%, while adding real-world data further slashed it to 20.7%.

Conclusion

CroCo v2 proves that large-scale self-supervised pre-training on real-world data, combined with flexible positional embeddings, allows generic transformers to master dense geometric tasks. While challenges remain regarding computational cost and high-resolution tiling—where disparities larger than the tile width can cause issues—this work paves the way for more universal vision models that bridge the gap between monocular and binocular understanding.

Summary updated

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