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, Jerome Revaud

Introduction

CroCo (Cross-View Completion) introduces a novel self-supervised pre-training paradigm designed to teach neural networks 3D geometry. By masking a staggering 90% of an input image and challenging the model to reconstruct it using a second, unmasked view of the same scene, CroCo forces the network to "triangulate" missing information. This cross-view approach helps the model develop a deep understanding of spatial relationships, allowing it to significantly outperform standard models on downstream geometric tasks like depth estimation and optical flow.

The Limitations of Standard Masked Image Modeling

Recent breakthroughs in computer vision have been heavily driven by Masked Image Modeling (MIM)—a technique analogous to a visual "fill-in-the-blanks" exercise. Models like Masked Autoencoders (MAE) learn by looking at a partially hidden image and predicting the missing pixels.

While MIM is highly effective for high-level "semantic" tasks like image classification or object detection, it struggles with 3D geometry. If you mask out a chair in a single photo, a standard MIM model can "hallucinate" a plausible chair based on its general knowledge of furniture. It does not actually need to understand the chair's exact position in 3D space to make a visually convincing guess. To solve 3D tasks like depth prediction or camera positioning, models must move beyond guessing what an object is and learn to reason about where it is.

The CroCo Method: Cross-View Completion

To bridge this gap, the authors shift the pretext task from single-view auto-completion to cross-view completion.

  1. The Setup: The model is provided with two images ($x_1$ and $x_2$) of the same scene, captured from different viewpoints.
  2. Extreme Masking: A massive 90% of the first image ($x_1$) is masked out.
  3. The Encoder: A Siamese Vision Transformer (ViT) independently processes the few visible patches of $x_1$ and the entirety of the reference image $x_2$.
  4. The Decoder: The decoder uses the encoded information from both images to reconstruct the missing 90% of $x_1$. To do this accurately, the model cannot rely on semantic hallucination; it must learn to find correspondences between the two views, essentially performing a form of mental triangulation.

The researchers experimented with two decoder architectures to facilitate this: CrossBlock, which uses cross-attention to let the image representations interact, and CatBlock, which simply concatenates the data. Both proved highly effective at learning geometric features.

Key Insights

  • Geometry over Hallucination: By providing a second view, the ambiguity of the masked patches is resolved through geometric reasoning rather than semantic priors. The model learns that a pixel's appearance is a direct function of its 3D position and the camera's perspective.
  • The 90% Sweet Spot: Standard MIM usually masks around 75% of an image. CroCo performs best at 90%. This extreme masking forces the model to rely almost entirely on the reference view, preventing it from "cheating" by using only local 2D context.
  • Synthetic-to-Real Transfer: CroCo was pre-trained on Habitat, a dataset of 1.8 million synthetic image pairs rendered from 3D indoor scans. Despite this synthetic origin, it transferred remarkably well to real-world datasets, suggesting it successfully learned universal laws of geometry.
  • Architecture Agnostic: Once pre-trained, the encoder can be used alone for single-image tasks (like monocular depth), or the full encoder-decoder stack can be used for two-image tasks (like optical flow), making it a versatile tool for 3D vision.

Performance and Results

CroCo was evaluated across a variety of monocular, binocular, and semantic tasks, demonstrating strong geometric capabilities:

  • Depth Estimation (Monocular): On the NYUv2 dataset, CroCo achieved an 86.2% accuracy ([email protected]), significantly beating standard MAE (79.6%) and specialized models like MultiMAE.
  • Optical Flow (Binocular): Without any task-specific architectural modifications, CroCo achieved a 3.00 Average Endpoint Error (AEPE) on the Sintel "clean" benchmark, outperforming MAE-based initializations by nearly 35%.
  • Camera Pose: On the 7-scenes dataset, CroCo outperformed almost all existing methods for direct relative pose regression, proving a superior grasp of how camera movement affects image appearance.

Limitations and Future Directions

While CroCo dominates in 3D and geometric tasks, it performs slightly worse than ImageNet-pre-trained models on pure semantic classification. This is likely because the synthetic "Habitat" training data is far less diverse in object categories than ImageNet. Additionally, CroCo requires pairs of images with overlapping views for pre-training, which are harder to source from unorganized web scrapes than single images.

Future work will likely focus on scaling CroCo to real-world image pairs (such as those from Structure-from-Motion datasets) and exploring hybrid approaches that combine CroCo's geometric strengths with the semantic robustness of traditional ImageNet pre-training.

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 Jerome 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