# 自监督单目深度估计

自监督单目深度估计是一种计算机视觉方法，它训练神经网络从单张图像预测逐像素深度，无需任何深度真值标签，而是以视频帧或立体像对之间的光度一致性作为训练信号。其动机是经济性的：来自激光雷达的深度标签昂贵且稀疏，基于Velodyne的真值覆盖不到输入图像5%的像素，并且带有传感器旋转、车辆运动和物体边界造成的误差。<sup>[1](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)</sup> 取而代之的是，网络被训练将一幅图像重投影到另一幅图像中并最小化由此产生的光度误差，于是任何未标注的视频或立体影像都可以成为训练数据。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>

| 关键事实 | 数值 |
|---|---|
| 网络输出 | 逐像素视差，通过 \( D = 1/(a\sigma + b) \) 转换为深度，约束在0.1到100单位之间<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> |
| 核心损失 | 光度误差 \( p_{e} = \alpha \cdot \frac{1 - \mathrm{SSIM}(I_{a}, I_{b})}{2} + (1 - \alpha) \cdot \| I_{a} - I_{b} \|_{1} \)，其中 \( \alpha = 0.85 \)<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> |
| 训练输入 | 单目视频三元组、校正后的立体像对，或两者兼用<sup>[3](https://github.com/nianticlabs/monodepth2)</sup> |
| KITTI Eigen划分（Monodepth2，640×192） | Abs Rel 0.115（单目）、0.109（立体）、0.106（单目+立体）；\( \delta < 1.25 \) 最高达0.877<sup>[3](https://github.com/nianticlabs/monodepth2)</sup> |
| 典型训练成本 | 单块Titan Xp上12小时（单目，20轮，640×192）<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> |
| 主要失效模式 | 遮挡、运动物体、无纹理区域和尺度歧义<sup>[4](https://doi.org/10.48550/arxiv.2211.03660)</sup> |

## 工作原理

该方法利用了一个事实：如果知道场景的深度和相机的相对运动，就可以将一幅图像 warp 到另一幅图像中。训练期间，深度网络为目标帧预测视差图，姿态网络预测帧间的6自由度相对相机运动。预测的视差和姿态被用于将源帧重投影到目标视图上，网络经过优化使重投影图像与原始图像逐像素匹配。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>

光度重投影误差合并了两项：\( p_{e} = \alpha \cdot \frac{1 - \mathrm{SSIM}(I_{a}, I_{b})}{2} + (1 - \alpha) \cdot \| I_{a} - I_{b} \|_{1} \)，其中 \( \alpha = 0.85 \)，因此结构相似性（SSIM）和原始L1强度均有贡献。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> 最终损失 \( L = \mu \cdot L_{p} + \lambda \cdot L_{s} \)，其中 \( \lambda = 0.001 \)，加入了一个边缘感知平滑项 \( L_{s} = \| \partial_{x} d^{*}_{t} \| e^{-\| \partial_{x} I_{t} \|} + \| \partial_{y} d^{*}_{t} \| e^{-\| \partial_{y} I_{t} \|} \)，该项惩罚视差梯度，除非图像本身存在边缘。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>

在立体监督中，深度直接由预测视差通过 \( \hat{Z} = b \cdot f / \hat{d} \) 得出，其中 \( \hat{d} \) 是预测视差，\( b \) 是立体基线，\( f \) 是焦距。<sup>[1](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)</sup> 由于单目视频不提供绝对尺度，预测存在尺度歧义，评估时使用中位数缩放；这种缺少度量尺度的问题限制了其在视觉SLAM、精确三维建模和视图合成中的可靠性。<sup>[5](https://arxiv.org/html/2501.11841v4)</sup>

## 具体做法

按照Monodepth2，一套实践者流水线如下<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>：

1. **数据。** 单目训练使用三个连续视频帧，经过筛选去除静止帧（Zhou等人的筛选得到39,810个KITTI训练三元组）。立体训练使用校正后的立体像对；联合单目+立体训练使用帧ID 0、−1和1，并启用立体。<sup>[3](https://github.com/nianticlabs/monodepth2)</sup>
2. **架构。** 一个U-Net深度网络，编码器为ResNet18（1100万参数），外加一个独立的ResNet18姿态网络，预测轴角旋转和平移，输出乘以0.01。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>
3. **优化。** Adam，批大小12，640×192分辨率，学习率 \( 10^{-4} \)，15轮后降至 \( 10^{-5} \)，共训练20轮。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>
4. **计算。** 单块GPU，约需9 GB（单目）、6 GB（立体）或11 GB（单目+立体）显存，分别耗时约12、8和15小时。<sup>[3](https://github.com/nianticlabs/monodepth2)</sup>

## 起源

两项同期工作奠定了该领域。Godard、Mac Aodha和Brostow于2016年在arXiv上提出Monodepth，在校正后的立体像对上训练全卷积网络，使用图像重建损失加左右一致性损失。<sup>[6](https://doi.org/10.48550/arxiv.1609.03677)</sup> Zhou及同事于2017年在arXiv上提出SfMLearner，从单目视频联合训练单视图深度网络和多视图姿态网络，二者通过光度视图合成损失耦合，但在测试时独立应用；该论文指出，据作者所知，此前没有系统以无监督方式从单目视频学习单视图深度。<sup>[7](https://doi.org/10.48550/arxiv.1704.07813)</sup> Monodepth论文将早期的基于图像重建的工作以及空间变换网络中的双线性采样归为其可微图像形成模型的组成部分。<sup>[1](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)</sup> 2019年的Monodepth论文通过自动掩码和最小重投影完善了这套方法，指出Monodepth产生了优于同期监督方法的结果，并且Zhou等人在最早的单目自监督方法之一中用独立的姿态网络训练深度。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>

## 变体

**立体与单目监督。** 立体像对方法使用标定的相机几何作为隐式姿态监督；单目视频方法联合学习深度和自我运动。联合单目+立体训练结合两种信号。<sup>[3](https://github.com/nianticlabs/monodepth2)</sup> 综述文献正是按这一划分将该领域分为基于立体像对和基于单目视频两种范式。<sup>[8](https://doi.org/10.1049/ipr2.70309)</sup>

**动态场景与尺度一致性。** SC-Depth系列处理场景动态：SC-Depth（V1）解决尺度一致视频深度的尺度不一致问题，SC-DepthV2增加了自动校正网络以处理旋转的手持视频，SC-DepthV3（Sun等人，2022）针对动态物体和模糊边界，通过现成的监督模型生成单图像伪深度先验，配合深度排序和边缘感知相对法向损失。<sup>[4](https://doi.org/10.48550/arxiv.2211.03660)</sup>

**架构。** MonoViT（Zhao等人，2022）将视觉Transformer应用于自监督深度<sup>[9](https://doi.org/10.48550/arxiv.2208.03543)</sup>，Lite-Mono（Zhang等人，2022）结合轻量CNN和Transformer。<sup>[10](https://doi.org/10.48550/arxiv.2211.13202)</sup> SQLdepth（Wang等人，2023）面向可泛化的精细结构单目深度估计。<sup>[11](https://doi.org/10.48550/arxiv.2309.00526)</sup>

**大规模伪标签与扩散模型。** [Depth Anything](https://www.edgepedia.org/zh/depth-anything)（Yang等人，2024）通过数据引擎将训练扩展到约6200万张未标注图像，用预训练教师模型为其标注伪深度，采用MiDaS的仿射不变损失，搭配DPT解码器和DINOv2编码器；该系列此后继续发展，Depth Anything 3（2025）在单目深度估计上显著优于Depth Anything V2。<sup>[12](https://doi.org/10.48550/arxiv.2401.10891)</sup> VFM-Depth在自监督教师-学生框架中使用视觉基础模型作为语义正则化，在KITTI、Cityscapes和Make3D上优于此前的自监督方法。<sup>[13](https://ieeexplore.ieee.org/document/10817597)</sup> DiffSQL用[Stable Diffusion](https://www.edgepedia.org/zh/stable-diffusion)特征增强自监督训练，在KITTI上以Abs Rel 1.03%、Sq Rel 2.79%的优势超过SQLdepth，并具有更强的零样本泛化能力<sup>[14](https://www.ijcai.org/proceedings/2025/0981.pdf)</sup>；BetterDepth用条件潜在扩散模型精炼前馈深度模型，训练仅需400对合成样本。<sup>[15](https://proceedings.neurips.cc/paper_files/paper/2024/file/c4b652b7e228b18e1c65478da3a4a2cf-Paper-Conference.pdf)</sup>

## 应用

单目深度估计的已记录应用领域包括场景重建、三维物体检测、机器人和自动驾驶；KITTI基准本身即由394个道路场景及Velodyne真值构建。<sup>[16](https://mdpi-res.com/d_attachment/sensors/sensors-20-02272/article_deploy/sensors-20-02272-v2.pdf?version=1587132207)</sup>

在697张图像的KITTI Eigen测试划分上，评估上限80 m并使用中位数缩放，Monodepth2单目训练640×192并用ImageNet预训练达到Abs Rel 0.115、Sq Rel 0.903、RMSE 4.863，\( \delta < 1.25 \) 为0.877。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> 仅立体训练达到Abs Rel 0.109和RMSE 4.960；单目+立体达到Abs Rel 0.106和RMSE 4.750。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> 作为参照，Zhou等人的SfMLearner在同一划分上报告Abs Rel 0.183<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup>，其论文自称性能与监督方法相当，但不及Godard等人的基于立体的方法。<sup>[7](https://doi.org/10.48550/arxiv.1704.07813)</sup>

## 局限与替代方案

自监督训练依赖多视图一致性假设，该假设在遮挡处（例如物体边界）和运动物体处被违反，因此方法往往仅在KITTI和NYUv2等近乎静态的场景中表现良好。<sup>[4](https://doi.org/10.48550/arxiv.2211.03660)</sup> 简单地将动态区域排除出训练会导致推理时在这些区域精度很差，而建模每个物体的运动又是病态问题。<sup>[4](https://doi.org/10.48550/arxiv.2211.03660)</sup> Monodepth2通过逐像素最小重投影损失缓解遮挡，并通过在前向传播中计算的二值自动掩码，拒绝那些对未warp源图像的恒等重投影误差低于warp重投影误差的像素，这可以抑制没有有用相机诱导运动的像素，例如静态相机序列中或与相机共同运动的物体。<sup>[2](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)</sup> 自监督方法在不同于训练分布的场景上也存在泛化问题。<sup>[16](https://mdpi-res.com/d_attachment/sensors/sensors-20-02272/article_deploy/sensors-20-02272-v2.pdf?version=1587132207)</sup>

与替代方案对比：监督网络在激光雷达衍生的标签上训练，这些标签覆盖不到5%的像素且包含采集误差<sup>[1](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)</sup>，然而Monodepth在KITTI上仍优于某些监督方法。<sup>[1](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)</sup> 零样本度量深度方法构成一个对比性的家族：ZoeDepth（Bhat等人，2023）扩展MiDaS，采用自适应度量分箱实现跨域度量迁移<sup>[17](https://doi.org/10.48550/arxiv.2302.12288)</sup>；Metric3D（Yin等人，2023）面向单图像零样本度量三维预测<sup>[18](https://doi.org/10.48550/arxiv.2307.10984)</sup>；Depth Pro（Bochkovskii等人，2024）在不到一秒内生成清晰的度量深度<sup>[19](https://doi.org/10.48550/arxiv.2410.02073)</sup>；UniDepth（Piccinelli等人，2024）提出通用单目度量深度估计。<sup>[20](https://doi.org/10.48550/arxiv.2403.18913)</sup> 相对深度的尺度歧义仍与这些度量方法形成最鲜明的对比。<sup>[5](https://arxiv.org/html/2501.11841v4)</sup>

## References

1. [Unsupervised Monocular Depth Estimation With Left-Right Consistency (CVPR 2017)](https://openaccess.thecvf.com/content_cvpr_2017/papers/Godard_Unsupervised_Monocular_Depth_CVPR_2017_paper.pdf)
2. [Digging Into Self-Supervised Monocular Depth Estimation (Monodepth2, ICCV 2019)](https://openaccess.thecvf.com/content_ICCV_2019/papers/Godard_Digging_Into_Self-Supervised_Monocular_Depth_Estimation_ICCV_2019_paper.pdf)
3. [nianticlabs/monodepth2 (official reference PyTorch implementation)](https://github.com/nianticlabs/monodepth2)
4. [Sun, Libo and colleagues (2022). SC-DepthV3: Robust Self-supervised Monocular Depth Estimation for Dynamic Scenes. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2211.03660)
5. [Survey on Monocular Metric Depth Estimation](https://arxiv.org/html/2501.11841v4)
6. [Godard, Clément, Mac Aodha, Oisin, Brostow, Gabriel J. (2016). Unsupervised Monocular Depth Estimation with Left-Right Consistency. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1609.03677)
7. [Zhou, Tinghui and colleagues (2017). Unsupervised Learning of Depth and Ego-Motion from Video. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1704.07813)
8. [Self-Supervised Monocular Depth Estimation: A Review of Paradigms, Evaluation Protocols, and Technical Advances](https://doi.org/10.1049/ipr2.70309)
9. [Zhao, Chaoqiang and colleagues (2022). MonoViT: Self-Supervised Monocular Depth Estimation with a Vision Transformer. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2208.03543)
10. [Zhang, Ning and colleagues (2022). Lite-Mono: A Lightweight CNN and Transformer Architecture for Self-Supervised Monocular Depth Estimation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2211.13202)
11. [Wang, Youhong and colleagues (2023). SQLdepth: Generalizable Self-Supervised Fine-Structured Monocular Depth Estimation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2309.00526)
12. [Yang, Lihe and colleagues (2024). Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2401.10891)
13. [VFM-Depth: Leveraging Vision Foundation Model for Self-Supervised Monocular Depth Estimation](https://ieeexplore.ieee.org/document/10817597)
14. [DiffSQL: Leveraging Diffusion Model for Zero-Shot Self-Supervised Monocular Depth Estimation (IJCAI 2025)](https://www.ijcai.org/proceedings/2025/0981.pdf)
15. [BetterDepth: Plug-and-Play Diffusion Refiner for Zero-Shot Monocular Depth Estimation (NeurIPS 2024)](https://proceedings.neurips.cc/paper_files/paper/2024/file/c4b652b7e228b18e1c65478da3a4a2cf-Paper-Conference.pdf)
16. [Deep Learning-Based Monocular Depth Estimation Methods, A State-of-the-Art Review (Sensors 2020)](https://mdpi-res.com/d_attachment/sensors/sensors-20-02272/article_deploy/sensors-20-02272-v2.pdf?version=1587132207)
17. [Bhat, Shariq Farooq and colleagues (2023). ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2302.12288)
18. [Yin, Wei and colleagues (2023). Metric3D: Towards Zero-shot Metric 3D Prediction from A Single Image. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2307.10984)
19. [Bochkovskii, Aleksei and colleagues (2024). Depth Pro: Sharp Monocular Metric Depth in Less Than a Second. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2410.02073)
20. [Piccinelli, Luigi and colleagues (2024). UniDepth: Universal Monocular Metric Depth Estimation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2403.18913)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Computer vision › Vision methods and geometry › 3D reconstruction and structure from motion

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/self-supervised-monocular-depth-estimation

English original: https://www.edgepedia.org/self-supervised-monocular-depth-estimation
