---
title: Self_Supervised_Depth_Completion
canonical_url: "https://www.modelscope.cn/models/Damo_XR_Lab/Self_Supervised_Depth_Completion"
md_url: "https://www.modelscope.cn/models/Damo_XR_Lab/Self_Supervised_Depth_Completion.md"
repository: Damo_XR_Lab/Self_Supervised_Depth_Completion
chinese_name: "自监督深度补全"
last_updated: 2024-03-07
license: "Apache License 2.0"
pipeline_tag: panorama-depth-estimation
tasks:
  - panorama-depth-estimation
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 382
stars: 1
tags:
  - Alibaba
  - XR
  - Depth
---

# Self_Supervised_Depth_Completion

> Self_Supervised_Depth_Completion - Damo_XR_Lab 在 ModelScope 开源的模型。任务 输入一张稀疏深度图，模型回返回补全后的稠密深度图。

Damo_XR_Lab/Self_Supervised_Depth_Completion 是 ModelScope 魔搭社区上的panorama-depth-estimation模型，采用 Apache License 2.0 许可。

- **Repository**: Damo_XR_Lab/Self_Supervised_Depth_Completion
- **License**: Apache License 2.0
- **Tasks**: panorama-depth-estimation
- **Tags**: Alibaba, XR, Depth
- **Downloads**: 382
- **Stars**: 1
- **Last updated**: 2024-03-07

Source: https://www.modelscope.cn/models/Damo_XR_Lab/Self_Supervised_Depth_Completion

---

#### Clone with HTTP
```bash
 git clone https://www.modelscope.cn/Damo_XR_Lab/Self_Supervised_Depth_Completion.git
```

# 深度图补全介绍

## 任务
输入一张稀疏深度图，模型回返回补全后的稠密深度图。

## 模型描述

本模型基于**Self-supervised Sparse-to-Dense: Self-supervised Depth Completion from LiDAR and Monocular Camera**，

技术细节请见：
**[[Paper](https://arxiv.org/pdf/1807.00275.pdf)]** |
**[[Project Page](https://github.com/fangchangma/self-supervised-depth-completion/)]**  <br />


## 代码示例

```python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.outputs import OutputKeys

model_id = 'Damo_XR_Lab/Self_Supervised_Depth_Completion'
data_dir = MsDataset.load(
    'KITTI_Depth_Dataset',
    namespace='Damo_XR_Lab',
    split='test',
    download_mode=DownloadMode.FORCE_REDOWNLOAD
).config_kwargs['split_config']['test']
source_dir = os.path.join(data_dir, 'selected_data')

snapshot_path = snapshot_download(model_id)
logger.info('snapshot_path: %s', snapshot_path)
self_supervised_depth_completion = pipeline(
    task=Tasks.self_supervised_depth_completion,
    model=model_id)

result = self_supervised_depth_completion(
    dict(model_dir=snapshot_path, source_dir=source_dir))
cv2.imwrite('result.jpg', result[OutputKeys.OUTPUT])
```

## 相关论文以及引用信息
该模型借鉴了以下论文的思路或代码，感谢作者的贡献！
```
@article{ma2018self,
	title={Self-supervised Sparse-to-Dense: Self-supervised Depth Completion from LiDAR and Monocular Camera},
	author={Ma, Fangchang and Cavalheiro, Guilherme Venturelli and Karaman, Sertac},
	booktitle={ICRA},
	year={2019}
}
@article{Ma2017SparseToDense,
	title={Sparse-to-Dense: Depth Prediction from Sparse Depth Samples and a Single Image},
	author={Ma, Fangchang and Karaman, Sertac},
	booktitle={ICRA},
	year={2018}
}
```
