TL;DR
CroCo (Cross-View Completion) is a self-supervised pre-training method that teaches models to reconstruct a heavily masked image by leveraging a second, unmasked view of the same scene. By shifting the focus from semantic "hallucination" to geometric reasoning, CroCo achieves state-of-the-art performance on 3D vision tasks like depth estimation and optical flow using a generic Transformer architecture.
What Problem Does This Paper Address?
Recent breakthroughs in self-supervised learning have been dominated by Masked Image Modeling (MIM), where a model learns by predicting missing patches of an image. While highly effective for high-level tasks like image classification, standard MIM (like MAE) often relies on "semantic priors"—for example, if an eye is masked, the model knows to put an eye there because it recognizes a face.
However, for 3D vision tasks—such as depth estimation, optical flow, or camera pose regression—semantic priors aren't enough. These tasks require a deep understanding of geometry and spatial relationships. In a single-view setup, reconstructing a masked wall is ambiguous; there's no geometric cue to tell the model exactly where a window or a corner should be. CroCo addresses this by introducing a second viewpoint, forcing the model to learn how to "match" features across views to solve the reconstruction puzzle.
Methods
The core of CroCo is the Cross-View Completion pretext task.
- Input: The model takes two images ($x_1$ and $x_2$) of the same scene from different viewpoints.
- Masking: A staggering 90% of the first image ($x_1$) is masked.
- Encoding: A Siamese Vision Transformer (ViT) encoder processes the visible patches of $x_1$ and the entirety of $x_2$ independently.
- Decoding: A decoder receives the encoded tokens from both images. The authors explored two architectures for fusion:
- CrossBlock: Alternates between self-attention on $x_1$ tokens and cross-attention between $x_1$ and $x_2$.
- CatBlock: Concatenates tokens from both views and applies self-attention across the joint set.
- Objective: The model is trained to minimize the Mean Squared Error (MSE) between the predicted and original pixels of the masked patches in $x_1$.
What makes this "new" is the transition from a single-image reconstruction to a conditional reconstruction based on a second view. This setup implicitly forces the model to learn epipolar geometry and correspondence without any explicit supervision.
Datasets
- Pre-training: The authors generated a massive synthetic dataset called Habitat, consisting of ~1.8 million image pairs. These were rendered using the Habitat simulator from 3D indoor datasets including HM3D, ScanNet, Replica, and ReplicaCAD.
- Evaluation:
- Monocular 3D: NYUv2 (depth estimation) and Taskonomy (8 different geometric tasks like surface normals and curvature).
- Binocular/Geometric: MPI-Sintel (optical flow) and 7-scenes (absolute and relative camera pose).
- Semantic: ADE20k (segmentation) and ImageNet-1K (classification) for comparison.
Key Insights and Ideas
- Geometry over Semantics: Unlike MAE, which performs best when pre-trained on ImageNet, CroCo thrives on indoor scene datasets (Habitat). This suggests that for 3D tasks, the diversity of geometric structures is more important than the variety of object categories.
- The 90% Masking Sweet Spot: A very high masking ratio is essential. It prevents the model from relying on local pixel correlations in the first image, forcing it to look at the reference image to find the missing information.
- Implicit Correspondence: By learning to reconstruct $x_1$ from $x_2$, the model naturally learns to find corresponding points across views. This allows the exact same pre-trained architecture to be used for optical flow and relative pose estimation without adding task-specific "cost volumes" or complex geometric layers.
- Solvability Matters: The authors found that pre-training works best when the two views have a "co-visibility" (overlap) of around 0.5. If the views overlap too much, the task is too easy; if they don't overlap at all, it becomes standard, ambiguous MIM.
Key Results
- Depth Estimation: On NYUv2, CroCo achieved an accuracy ($\delta_1$) of 85.6%, significantly outperforming a MAE model pre-trained on the same data (79.0%).
- Taskonomy: CroCo ranked first or second on 6 out of 8 geometric tasks, showing superior transferability to dense 3D regression.
- Optical Flow: Despite being a generic Transformer, CroCo achieved an Average Endpoint Error (AEPE) of 3.00 on Sintel (clean), which is competitive with specialized architectures like PWC-Net (2.55) that are specifically designed for flow.
- Relative Pose: CroCo outperformed most existing methods that directly regress camera pose, proving its internal representations are highly sensitive to camera motion.
Limitations and Future Work
- Semantic Trade-off: While CroCo is a beast at 3D tasks, it lags behind standard MIM models on high-level semantic tasks like ImageNet classification. The authors attribute this to the indoor-focused pre-training data.
- Synthetic vs. Real: The current model relies heavily on synthetic data from the Habitat simulator. The authors suggest that future work should explore using real-world image pairs, perhaps sourced from Structure-from-Motion (SfM) pipelines.
- Resolution: The model was primarily tested at $224 \times 224$ resolution. Scaling to higher resolutions for tasks like optical flow remains a challenge for future iterations.
Summary updated