Boost 3D Reconstruction using Diffusion-based Monocular Camera Calibration

Junyuan Deng, Wei Yin, Xiaoyang Guo, Qian Zhang, Xiaotao Hu, Weiqiang Ren, Xiao-Xiao Long, Ping Tan

TL;DR

This paper introduces DM-Calib, a novel diffusion-based approach for monocular camera calibration that leverages the powerful image priors of stable diffusion models. By representing camera intrinsics as a "Camera Image," DM-Calib seamlessly integrates with diffusion models, achieving state-of-the-art calibration accuracy and significantly boosting performance in downstream 3D vision tasks like depth estimation and reconstruction.

What Problem Does This Paper Address?

Accurate camera calibration is fundamental for many 3D computer vision tasks, but monocular calibration (estimating camera parameters from a single image) is notoriously challenging due to its ill-posed nature. Traditional methods often rely on multiple images or specific calibration objects, limiting their applicability in real-world, unconstrained scenarios. While recent learning-based methods have shown promise, they often struggle with generalization due to limited training data and overfitting. This paper addresses the need for a robust and generalizable monocular camera calibration method that can leverage the vast knowledge embedded in large-scale pre-trained models.

Methods

The core of DM-Calib lies in its novel "Camera Image" representation. Instead of directly regressing numerical intrinsic parameters (focal length, optical center), the authors encode these parameters into a 3-channel color image. This representation is designed to be compatible with diffusion models, which are inherently image-based.

The process involves:

  1. Camera Image Representation: The intrinsic parameters (fx, fy, cx, cy) are transformed into a 2-channel pseudo-spherical representation (azimuth and elevation), and the original grayscale image is incorporated as a third channel to prevent mode collapse and improve representation.
  2. Diffusion Model Fine-tuning: A pre-trained Stable Diffusion model is fine-tuned to act as an "Image-to-Camera-Image" (I2C) generator. Given an input RGB image, the model generates the corresponding Camera Image.
  3. Intrinsic Extraction: The camera intrinsic matrix (K) is then recovered from the generated Camera Image using a RANSAC algorithm, leveraging the relationship between the Camera Image pixels and the intrinsic parameters.

This approach allows DM-Calib to leverage the powerful image priors learned by diffusion models, which implicitly understand imaging characteristics like focal length effects.

Datasets

The paper utilizes a wide array of datasets for training and evaluation, highlighting its focus on real-world generalization:

  • Training Data: NuScenes, KITTI, CityScapes, NYUv2, SUN3D, ARKitScenes, Objectron, MVImgNet, HyperSim, Virtual KITTI, Taskonomy, and TartanAir.
  • Zero-Shot Testing Data: Waymo, RGBD, ScanNet, MVS, and Scenes11.
  • Metric Depth Training Data: Taskonomy, HyperSim, TartanAir, Virtual KITTI, Waymo, and Argoverse2, along with 10k synthetic city samples.
  • Metric Depth Evaluation Data: NuScenes, ETH3D, Diode, VOID, IBims-1, and NYUV2.

Key Insights and Ideas

  • Diffusion Models as Implicit Priors for Intrinsics: The paper's central insight is that large-scale diffusion models, trained on diverse image-text pairs, implicitly capture rich information about imaging properties like focal length. This knowledge can be "unlocked" for camera calibration.
  • The "Camera Image" Representation: Moving beyond numerical regression, encoding intrinsics into an image format is crucial for seamless integration with diffusion models. This representation preserves high-frequency details and resembles natural images, bridging the gap between numerical parameters and image generation.
  • I2C Generation for Calibration: Reformulating camera calibration as an image-to-image generation task (I2C) allows the use of powerful pre-trained diffusion models, avoiding the need for extensive task-specific training from scratch.
  • Generalization through Diverse Priors: By leveraging diffusion models trained on massive, diverse datasets, DM-Calib achieves superior generalization capabilities compared to methods trained on smaller, specialized datasets.

Key Results

  • State-of-the-Art Calibration: DM-Calib achieves the highest calibration accuracy on five zero-shot datasets, outperforming previous diffusion-based and geometry-inspired methods.
  • Improved Downstream Tasks: The accurate camera intrinsics estimated by DM-Calib significantly boost performance in various 3D vision tasks, including:
  • Monocular Metric Depth Estimation: Achieves comparable performance to SOTA methods with finer details and more accurate structural relationships.
  • Sparse-View 3D Reconstruction & Pose Estimation: Demonstrates improved 3D alignment and pose estimation, especially when dealing with varying focal lengths.
  • Monocular 3D Metrology: Accurately recovers real-world object sizes and shows robustness to focal length variations.
  • Robustness: The method shows robustness across diverse and challenging scenarios, including outdoor, indoor, and even randomly shaped, moving objects (Scenes11 dataset).

Limitations and Future Work

  • Ultra-Wide-Angle Images: The paper notes that performance slightly decreases with ultra-wide angles due to the scarcity of such images in the training data. Future work could address this by incorporating more diverse training data.
  • Inference Efficiency: The authors suggest improving inference efficiency by developing few-step diffusion models.
  • Real-world vs. Synthetic Data: Training solely on synthetic data proved problematic, especially for indoor scenarios. The paper highlights the importance of real-world data and suggests further investigation into the camera image's role in metric depth estimation with more diverse datasets.

Summary updated

BibTeX
@inproceedings{deng2025boost,
  author = {Junyuan Deng and Wei Yin and Xiaoyang Guo and Qian Zhang and Xiaotao Hu and Weiqiang Ren and Xiao-Xiao Long and Ping Tan},
  title = {{Boost 3D Reconstruction using Diffusion-based Monocular Camera Calibration}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure