CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion

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

Abstract

Masked Image Modeling (MIM) has recently been established as a potent pre-training paradigm. A pretext task is constructed by masking patches in an input image, and this masked content is then predicted by a neural network using visible patches as sole input. This pre-training leads to state-of-the-art performance when finetuned for high-level semantic tasks, e.g. image classification and object detection. In this paper we instead seek to learn representations that transfer well to a wide variety of 3D vision and lower-level geometric downstream tasks, such as depth prediction or optical flow estimation. Inspired by MIM, we propose an unsupervised representation learning task trained from pairs of images showing the same scene from different viewpoints. More precisely, we propose the pretext task of cross-view completion where the first input image is partially masked, and this masked content has to be reconstructed from the visible content and the second image. In single-view MIM, the masked content often cannot be inferred precisely from the visible portion only, so the model learns to act as a prior influenced by high-level semantics. In contrast, this ambiguity can be resolved with cross-view completion from the second unmasked image, on the condition that the model is able to understand the spatial relationship between the two images. Our experiments show that our pretext task leads to significantly improved performance for monocular 3D vision downstream tasks such as depth estimation. In addition, our model can be directly applied to binocular downstream tasks like optical flow or relative camera pose estimation, for which we obtain competitive results without bells and whistles, i.e., using a generic architecture without any task-specific design.

Introduction

Recent breakthroughs in computer vision have been driven by Masked Image Modeling (MIM), such as the Masked Auto-Encoder (MAE). In standard MIM, a model learns by filling in missing patches of a single image. While highly effective for high-level semantic tasks like object detection, single-view MIM relies heavily on semantic priors—the model "guesses" missing content based on object categories rather than geometric precision.

For 3D and geometric tasks like depth or motion estimation, models require a deep understanding of spatial structure. Single-view masking is inherently ambiguous; one cannot definitively know what is behind a mask from a single angle. CroCo (Cross-View Completion) addresses this by forcing the model to "triangulate" information across different viewpoints, learning the fundamental language of 3D geometry.

Methods: The Cross-View Completion Task

The core innovation of CroCo is its pretext task, which moves beyond simple auto-completion to spatial reasoning.

  1. Input: The model receives two images ($x_1$ and $x_2$) of the same scene from different viewpoints.
  2. Masking: A staggering 90% of the first image ($x_1$) is masked, leaving only a few visible patches.
  3. Encoding: A Siamese Vision Transformer (ViT) encoder processes the visible patches of $x_1$ and the entirety of $x_2$ independently.
  4. Decoding: A transformer-based decoder attempts to reconstruct the missing patches of $x_1$. To succeed, it must attend to the reference image ($x_2$) and understand the geometric relationship between the two views.
The masked view of the target image serves as the primary input, with 90% of the content removed.
The reference view provides the necessary geometric information to reconstruct the masked patches of the target.

This setup forces the model to find correspondences between the two views, effectively learning 3D geometry without manual labels. The authors found that a high masking ratio is critical; at 90%, the model cannot rely on local context and must look at the reference view.

Datasets and Evaluation

Pre-training: The model was trained on Habitat, a synthetic dataset of 1.8 million image pairs rendered from indoor 3D environments (HM3D, ScanNet, Replica). Pairs were selected to ensure at least 50% co-visibility, providing enough overlap for reconstruction while maintaining sufficient difficulty.

Downstream Tasks: * Monocular Depth Estimation: Evaluated on NYUv2. * Geometric Tasks: A suite of 8 tasks from Taskonomy (curvature, edges, etc.). * Binocular Tasks: Optical flow on MPI-Sintel and camera pose regression on 7-scenes.

Key Results

  • Depth Estimation: On NYUv2, CroCo achieved 85.6% [email protected], significantly outperforming standard MAE (79.6%) and MultiMAE (83.0%).
  • Taskonomy: CroCo ranked first on 6 out of 8 geometric tasks compared to other self-supervised methods.
  • Optical Flow: Using a generic ViT architecture, CroCo achieved an Average Endpoint Error (AEPE) of 3.00 on MPI-Sintel, proving competitive with specialized architectures like PWC-Net.
  • Pose Regression: CroCo-pretrained models showed superior robustness on the 7-scenes dataset, especially when training labels were scarce (e.g., using only 5% of data).

Conclusion and Future Work

CroCo demonstrates that cross-view completion is a powerful pretext task for learning geometric representations. While it currently lags behind ImageNet-pretrained models in pure semantic classification—likely due to the indoor nature of the Habitat dataset—it excels in 3D vision. Future work may involve scaling CroCo to larger, real-world datasets (e.g., from Structure-from-Motion) and more diverse outdoor environments to bridge the semantic gap and further improve robustness.

Summary updated

BibTeX
@inproceedings{weinzaepfel2022croco,
  author = {Philippe Weinzaepfel and Vincent Leroy and Thomas Lucas and Romain Brégier and Yohann Cabon and Vaibhav Arora and Leonid Antsfeld and Boris Chidlovskii and Gabriela Csurka and Jérôme Revaud},
  title = {{CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=wZEfHUM5ri},
}
Figure