TL;DR
When calibrating a camera from a single random photo, recent AI models predict a dense field of roughly 100,000 light rays—one for every pixel—just to figure out a handful of lens parameters. LiteCalib shows that predicting a sparse $5 \times 5$ grid of just 25 rays is completely sufficient, slashing runtimes by over 5$\times$ while remaining compatible with any camera lens model. Paired with a massive expansion in open-licensed training data, it sets a new state-of-the-art in both speed and accuracy.
What Problem Does This Paper Address?
Every 3D computer vision task—from stitching together 3D reconstructions to robotic navigation—needs to know the geometry of the camera that took the picture (its focal length, field of view, and how the lens bends light, known as intrinsics). Historically, calibrating a camera meant waving a black-and-white checkerboard in front of it. For "in-the-wild" internet photos, you don't have that luxury; you have to guess the lens math from a single image of an arbitrary scene.
Because lenses vary wildly—from standard smartphone pinholes to ultra-wide fisheyes—predicting lens parameters directly locks a neural network into one specific mathematical camera model. To stay "model-agnostic," current state-of-the-art methods (like AnyCalib) predict an intermediate per-pixel map of 3D ray directions ($\sim 10^5$ rays), and then run a heavy mathematical optimization step afterward to fit whichever camera model the user wants.
The catch? Predicting and optimizing over 100,000 rays for every image is computationally expensive. In fact, fitting the camera model to that dense field can take nearly three times longer than running the neural network itself. The authors ask a refreshingly simple question: Do calibration fields actually need to be dense?
Methods
LiteCalib strips away the computational bloat at both the network level and the mathematical fitting level:
- 25 Rays Instead of 100,000: Instead of a heavy per-pixel decoder, LiteCalib feeds image tokens from a standard DINOv2 Vision Transformer (ViT) backbone into a lightweight two-layer transformer decoder with just 25 learned queries. These correspond to a $5 \times 5$ grid evenly spaced across the image (including the corners, where lens distortion is most obvious). For each point, it predicts the 3D ray using two simple signed angles ($\omega_x, \omega_y$) relative to the optical axis.
- Training Scaffolding (Auxiliary Dense Loss): Training a large ViT backbone using error signals from only 25 points per image isn't enough for peak accuracy. During training only, the authors attach a dense per-pixel decoder branch to help guide the backbone's representations. At inference time, this dense branch is thrown away, adding zero runtime cost.
- Lightning-Fast Numba Fitting: Standard PyTorch optimization routines have high overhead. The authors reimplemented the post-inference camera parameter solver in Numba (for both CPU and GPU), assuming centered principal points and square pixels, and found that just two iterations of Gauss-Newton refinement (down from ten) is plenty.
Datasets
Data scaling turns out to be the secret sauce for accuracy.
- Training: Alongside existing synthetic views from OpenPano V2 (3,651 panoramas) and 1.21M real distorted crowd-sourced photos from MegaScenes, the authors introduce CommonsPano—a newly curated dataset of 9,891 high-resolution panoramas from Wikimedia Commons with permissive licenses, rendered into 148,626 synthetic views across pinhole and distorted lens models.
- Evaluation: Tested across 10 benchmarks. In addition to 7 standard benchmarks (Stanford2D3D, TartanAir, LaMAR, ScanNet++, Mono, and MegaDepth original/undistorted), they added InFlux, InFlux++ Real (videos with dynamically changing focal lengths/focus), and Cathedral (42 distinct distorted cameras) to ensure diverse camera coverage.
Key Insights and Ideas
- Dense inference is redundant, but dense training isn't: Subsampling an existing dense field from $\sim 10^5$ pixels down to a $5 \times 5$ grid causes zero accuracy loss (and only breaks at $3 \times 3$ when four-parameter fisheye models run out of mathematical constraints). However, supervising a network from scratch on 25 points alone degrades performance—making the "train dense, infer sparse" strategy a crucial insight.
- Data beats fancy representations: Ablation studies testing five random seeds per variant showed that whether the network outputs signed angles ($\omega$), differential geometry vectors ($\theta$), or a 1D radial profile barely matters statistically. Scaling up the training data mix is what actually drives the massive leap in accuracy.
- Calibration priors rescue modern 3D AI: Off-the-shelf 3D "foundation" reconstruction models fail badly when handed radially distorted internet photos. Feeding them LiteCalib's quick lens estimates beforehand dramatically restores their 3D reconstruction quality.
Key Results
LiteCalib dominates the speed-accuracy Pareto frontier across both server-grade GPUs and edge devices:
- Accuracy & Speed: Compared to the officially released AnyCalib model, LiteCalib reduces median ray angular error by 41% (from $1.975^\circ$ down to $1.165^\circ$) while running 5.4$\times$ faster end-to-end on an NVIDIA A100 (9.7 ms total vs. 52.6 ms).
- Solver Speedup: On CPU, the Numba sparse solver fits camera models in just 0.14–0.3 ms—over 100$\times$ faster than the official PyTorch dense fit (~35–40 ms on GPU).
- Apples-to-Apples: When AnyCalib is retrained on LiteCalib's expanded dataset and paired with the new GPU solver, both networks tie in accuracy (~73.7%–73.9% mAA at $5^\circ$), proving the 25-ray bottleneck loses nothing while running 1.4$\times$ faster on an A100 and up to 2.6$\times$ faster on an edge Jetson Orin Nano (ViT-S).
- Downstream 3D Tasks: On distorted scenes like Zip-NeRF, adding LiteCalib priors boosts feed-forward 3D reconstruction pose accuracy (
DA3) from 2.9% to 69.5% mAA($5^\circ$), and consistently improves COLMAP Structure-from-Motion and two-view relative pose estimation.
Limitations and Future Work
Outside of specific experiments on artificially cropped and squashed images, LiteCalib assumes radially symmetric distortion, square pixels, and a principal point fixed at the exact center of the image. While great for most consumer cameras, it currently does not model tangential distortion or subtle real-world manufacturing deviations (like slightly off-center sensors), which the authors leave for future work.
Summary updated