Generalizing to the Open World: Deep Visual Odometry With Online Adaptation

Shunkai Li, Xin Wu, Yingdian Cao, Hongbin ZhaCVPR 2021

Deep visual odometry (VO) models often "collapse" when moving from their training environment to a new one. This paper introduces a framework that enables deep VO networks to adapt online in a self-supervised manner by combining the strengths of deep learning with classical geometric constraints and Bayesian inference. The result is a system that can be trained on outdoor driving data and still perform accurately in complex indoor environments.

The Challenge of Domain Adaptation in Visual Odometry

Visual Odometry—the process of estimating a camera's motion from a video stream—is a cornerstone of robotics and autonomous driving. While deep learning has pushed the boundaries of VO, these models suffer from a massive "domain gap." A model trained on the wide-open, sunny streets of the KITTI dataset will likely fail when placed in a cluttered, indoor office.

The authors identify a key reason for this: many deep VO methods treat the problem as a "black box," trying to learn everything (pose, depth, flow) end-to-end. When the visual distribution changes, the black box breaks. Furthermore, these models often lack multi-view geometric consistency, leading to significant "scale drift" where the estimated trajectory shrinks or grows over time.

A Hybrid Framework for Online Adaptation

The authors propose a hybrid approach that integrates "scene-agnostic" geometry into the learning loop. Their framework consists of several key components:

  • Analytical Pose Recovery: Instead of using a PoseNet to guess the camera's motion, the system solves for pose analytically using optical flow (from a FlowNet) and depth (from a DepthNet) via essential matrix estimation or Perspective-n-Point (PnP) algorithms.
  • Bayesian Depth Refinement: The system doesn't just accept a single-view depth prediction as final. It uses a probabilistic Bayesian framework to continuously improve depth estimates as new frames arrive, essentially "fusing" new observations into the current map.
  • Differentiable Gauss-Newton Layer: To bridge the gap between classical optimization and deep learning, they implement a differentiable Gauss-Newton layer. This allows the network to minimize photometric error during inference, optimizing both pose and depth on the fly.
  • Uncertainty Modeling: The network learns to predict "uncertainty maps" for both depth and photometry. This allows the system to ignore "noisy" areas—like moving cars or textureless walls—during the optimization process.

Evaluation and Generalization

The researchers evaluated their model's generalization ability across several standard benchmarks:

  • Cityscapes: Used primarily for pretraining (outdoor urban driving).
  • KITTI: Used for testing outdoor generalization (trained on Cityscapes, tested on KITTI).
  • TUM-RGBD: Used to test the extreme jump from outdoor pretraining to indoor robotic navigation.
  • NYUv2: Used specifically to evaluate the accuracy of the depth estimation component in indoor scenes.

Key Insights

  • Geometry is Universal: While the appearance of a scene changes (trees vs. desks), the laws of geometry do not. By forcing the network to respect these laws through analytical solvers, the model becomes much more robust to new environments.
  • Online Adaptation is Essential: Static models are brittle. By retraining the DepthNet and FlowNet for just two iterations at every time step using self-supervised losses, the model "learns" the characteristics of the new environment in real-time.
  • Uncertainty as a Filter: By explicitly modeling uncertainty, the system gains a "self-awareness" of where its predictions are likely to be wrong, preventing bad data from corrupting the pose and depth optimization.

Results: Bridging the Domain Gap

The most striking result is the model's generalization performance. When trained on Cityscapes and tested on KITTI, the proposed method achieved translation and rotation errors that were an order of magnitude smaller than other state-of-the-art self-supervised methods.

Generalization performance across outdoor (KITTI) and indoor (TUM) environments. The model is pretrained on Cityscapes, tested on KITTI, and then tested on TUM. The trajectories show that the proposed online adaptation ("Ours") closely follows the ground truth compared to the "No Adaptation" baseline.

In the "Outdoor to Indoor" test (KITTI to TUM), most competing learning-based models failed completely due to the massive domain shift. The authors' method, however, remained stable and produced accurate trajectories, even outperforming classical "hand-crafted" systems like ORB-SLAM2 in challenging, textureless indoor sequences. Qualitatively, their depth maps showed significantly sharper edges and finer details compared to standard models like Monodepth2.

Limitations and Future Work

While the online adaptation is fast, it still requires retraining the networks for two iterations at every time step. On a modern GPU (GTX 2080Ti), this is manageable, but it might pose challenges for low-power edge devices.

Additionally, while the uncertainty modeling helps mitigate the impact of dynamic objects, the underlying geometric assumptions still largely rely on a "static world." Future work could involve more explicit handling of non-rigid motion or integrating long-term loop closure to further reduce global trajectory drift.

Summary updated

BibTeX
@inproceedings{li2021generalizing,
  author = {Shunkai Li and Xin Wu and Yingdian Cao and Hongbin Zha},
  title = {{Generalizing to the Open World: Deep Visual Odometry With Online Adaptation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01298},
}
Figure