Abstract
AnyCam is a transformer-based model designed to recover camera poses and intrinsics from uncalibrated, dynamic "casual" videos. By leveraging uncertainty-aware losses and discrete focal length hypotheses, AnyCam achieves state-of-the-art accuracy in a fast, feed-forward manner without requiring labeled 3D training data.
Introduction
Traditional Structure-from-Motion (SfM) and SLAM systems often struggle with "casual" videos—shaky, uncalibrated footage containing moving objects. These systems typically assume a static world and known camera intrinsics. When these assumptions are violated, such as in a crowded street or a handheld smartphone recording, traditional methods frequently fail. While deep learning alternatives exist, they often require expensive labeled datasets or time-consuming test-time optimization.
AnyCam addresses these challenges by providing a robust, fast, and "universal" solution trainable on raw, unlabeled video. It effectively disentangles camera motion from scene dynamics and estimates internal camera parameters directly from visual cues.
Methodology
AnyCam utilizes a transformer-based architecture to process video sequences. The pipeline consists of several integrated stages:
- Feature Extraction: The model uses pre-trained networks to generate dense depth maps (e.g., UniDepth) and optical flow (e.g., UniMatch) as initial inputs.
- Transformer Backbone: A transformer encoder processes multiple frames simultaneously, capturing the temporal context necessary to reconstruct the camera's trajectory.
- Multi-Hypothesis Intrinsics: To handle the ambiguity of focal length, the model employs multiple "heads," each assuming a different focal length. A sequence head then predicts the most likely hypothesis.
- Uncertainty-Aware Flow Loss: A core innovation is the prediction of pixel-wise uncertainty maps. During training, the model learns to downweight dynamic regions (like moving vehicles), focusing the loss on stable background elements to refine pose estimation.
- Refinement: A lightweight Bundle Adjustment (BA) step, guided by the predicted uncertainty maps, can be applied to further improve results by ignoring dynamic objects.
Key Insights
- Uncertainty as a Proxy for Dynamics: AnyCam avoids the need for explicit segmentation masks. Instead, it learns to identify dynamic regions through uncertainty maps, which highlight areas where geometric flow cannot be explained by camera motion alone.
- Disentangling Rotation and Zoom: The use of discrete focal length hypotheses prevents the model from confusing camera translation with zoom or rotation, a common failure mode in pose estimation.
- Learning Motion Priors: By training on a vast corpus of human-captured video (e.g., YouTube-VOS, RealEstate10K, WalkingTours), the model learns natural camera motion priors, enhancing its robustness to noisy real-world inputs.
Results and Evaluation
AnyCam was evaluated on several "zero-shot" benchmarks, including Sintel, TUM-RGBD, Davis, Waymo, and Aria Everyday Activities.
- Performance: On dynamic benchmarks like Sintel and TUM-RGBD, AnyCam matched or exceeded the performance of specialized systems such as ParticleSfM and CasualSAM.
- Efficiency: AnyCam is significantly faster than optimization-based methods. Its feed-forward prediction takes approximately 5 seconds, compared to over an hour for methods like CasualSAM.
- Generalization: The model demonstrated strong zero-shot capabilities across diverse domains, from autonomous driving to egocentric footage, despite not being trained on those specific datasets.
Limitations and Future Work
While AnyCam represents a significant step forward, it still faces challenges such as drift in very long sequences. Additionally, its performance is dependent on the quality of the underlying pre-trained depth and flow models. Future work may involve integrating AnyCam into larger 3D foundation models to further leverage the vast amount of unlabeled video data available online for advanced spatial reasoning.
Summary updated