TL;DR
This paper introduces Calibration Tokens, a lightweight, self-supervised adaptation mechanism that allows frozen foundational monocular depth estimators (FMDEs) trained on perspective images to work accurately on fisheye images. By inserting a small set of trainable tokens into the transformer layers, the method aligns fisheye latent embeddings with perspective ones, avoiding the artifacts and latency of traditional image-space undistortion.
What Problem Does This Paper Address?
Foundational monocular depth estimators (FMDEs) like MiDaS and DepthAnything are incredibly powerful, having been trained on tens of millions of perspective images. However, they fail dramatically when applied to fisheye cameras.
This failure stems from a covariate shift: fisheye lenses introduce severe radial distortion where straight lines appear curved, altering object appearance and throwing off the network's spatial expectations.
Standard fixes fall short:
- Geometric Undistortion/Reprojection: Preprocessing images to remove distortion introduces latency and spatial artifacts (stretching, cropping, aliasing), which still degrade depth estimation.
- Finetuning or Training from Scratch: Large-scale fisheye datasets are rare. Finetuning a massive foundational model on a small dataset risks "parameter drift," destroying its hard-earned ability to generalize to diverse scenes.
Methods
Instead of altering the raw pixels or modifying the weights of the foundational model, the authors propose a latent-space fix using Calibration Tokens.
1. Layer-wise Token Modulation
Leveraging the transformer architecture common in modern FMDEs, the authors append a small set of learnable tokens ($\Phi$) to the input sequence of patch embeddings at each encoder layer. Through the network's self- and cross-attention mechanisms, these tokens "recalibrate" or translate the distorted fisheye embeddings back toward a standard perspective distribution. The base model weights remain completely frozen.
2. Self-Supervised "Undo" Loss
To train these tokens without requiring real fisheye ground-truth depth, the authors use a clever self-supervised pipeline:
- Forward Distortion: Standard perspective images are synthetically distorted into fisheye views using the Kannala-Brandt distortion model.
- Depth Estimation: The original perspective image is passed through the frozen FMDE to generate a high-fidelity pseudo-ground truth depth map. The synthetic fisheye image is passed through the same model with the Calibration Tokens.
- Perspective-Space Loss: Instead of comparing depth maps in the distorted fisheye space (which introduces information loss), the predicted fisheye depth map is un-warped back to the perspective reference frame. A
LogL1loss is then computed between the un-warped prediction and the pseudo-ground truth.
Datasets
- Training (Perspective Images Only): The tokens were trained on a joint dataset of approximately 200,000 samples combining indoor scenes (NYUv2, VOID, IRS, Hypersim) and outdoor urban scenes (Waymo Open Dataset).
- Evaluation (Real Fisheye Images):
- ScanNet++: Indoor 3D reconstructions captured with a DSLR and a fisheye lens.
- KITTI-360: Outdoor suburban driving scenes captured with $360^\circ$ fisheye cameras.
Key Insights and Ideas
- Lossless Inference: Because the adaptation happens entirely within the latent space of the neural network, the raw input pixels are never cropped, stretched, or resampled during inference.
- Layer-wise vs. Single Token: Appending tokens only at the first layer has a diminishing effect as information flows deeper into the network. Providing unique tokens at every layer ensures the distortion is corrected across all levels of abstraction.
- Backward Compatibility: The system remains fully backward-compatible. To switch from a fisheye camera back to a perspective camera, an engineer simply removes the calibration tokens from the input sequence.
Key Results
The authors tested their method across three prominent FMDE backbones (MiDaS, DepthAnything, and UniDepth) and achieved state-of-the-art zero-shot generalization:
- Indoor Performance (ScanNet++): Integrating Calibration Tokens improved the Root Mean Squared Error (RMSE) by 12% for MiDaS, 17% for DepthAnything, and 13% for UniDepth compared to their respective baselines.
- Outperforming Baselines: UniDepth with Calibration Tokens outperformed specialized fisheye models like DepthAnyCamera by 11% in RMSE, despite DepthAnyCamera requiring test-time camera intrinsics.
- Minimal Computational Overhead: The tokens add virtually zero cost. Memory usage increased by a mere 0.02% to 0.05% (< 1 MB), and inference latency increased by less than 1 millisecond (< 0.8%).
Limitations and Future Work
The primary limitation of this approach is its inherent dependency on the underlying foundational model. Calibration Tokens can align the data distributions, but if the frozen FMDE inherently struggles with a specific type of scene, lighting condition, or geometry in perspective views, those shortcomings will carry over to the fisheye domain.
The authors suggest that this token-based calibration strategy could be generalized beyond depth estimation to other vision tasks plagued by camera distortion, such as optical flow, semantic segmentation, and object detection.
Summary updated