---
title: cv_densenet161_image-depth-estimation_bts
canonical_url: "https://www.modelscope.cn/models/damo/cv_densenet161_image-depth-estimation_bts"
md_url: "https://www.modelscope.cn/models/damo/cv_densenet161_image-depth-estimation_bts.md"
repository: damo/cv_densenet161_image-depth-estimation_bts
chinese_name: "多尺度局部平面引导的单目深度估计"
last_updated: 2023-03-08
license: "MIT License"
pipeline_tag: image-depth-estimation
tasks:
  - image-depth-estimation
model_type:
  - densenet
  - bts
library_name:
  - pytorch
frameworks:
  - pytorch
domain:
  - cv
downloads: 814
stars: 1
tags:
  - Depth
  - "3D Vision"
  - densenet161
  - bts
---

# cv_densenet161_image-depth-estimation_bts

> cv_densenet161_image-depth-estimation_bts - damo 在 ModelScope 开源的模型。任务简介 单目深度估计，是指以单目RGB图像作为输入，根据图像中的结构信息、角点信息、相对位置信息等等对输入中的每个像素的深度值进行估计，输出稠密深度图。

damo/cv_densenet161_image-depth-estimation_bts 是 ModelScope 魔搭社区上的image-depth-estimation模型，采用 MIT License 许可。

- **Repository**: damo/cv_densenet161_image-depth-estimation_bts
- **License**: MIT License
- **Tasks**: image-depth-estimation
- **Tags**: Depth, 3D Vision, densenet161, bts
- **Downloads**: 814
- **Stars**: 1
- **Last updated**: 2023-03-08

Source: https://www.modelscope.cn/models/damo/cv_densenet161_image-depth-estimation_bts

---

# 算法介绍

### 任务简介
单目深度估计，是指以单目RGB图像作为输入，根据图像中的结构信息、角点信息、相对位置信息等等对输入中的每个像素的深度值进行估计，输出稠密深度图。

### 模型介绍
本模型来自于**From Big to Small: Multi-Scale Local Planar Guidance for Monocular Depth Estimation**论文。
**[[Paper](https://arxiv.org/abs/1907.10326)]** |
**[[Project page](https://github.com/cleinc/bts)]**

模型主要探索如果充分利用多尺度的信息来提升稠密深度图的效果，例如在主架构中加入ASPP模块，在不同尺度的分支之间添加充足的skip-connection来将多尺度信息融合，而在各个分支内设计Local Planar Guidance模块来利用局部信息。

模型结构

![模型结构](description/bts-model.png)

### 模型推理示例
仅支持GPU
```python
import cv2

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


image = 'https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/image_depth_estimation_kitti_007517.png'

estimator = pipeline(task=Tasks.image_depth_estimation, model='damo/cv_densenet161_image-depth-estimation_bts')
result = estimator(input=image)
depth_vis = result[OutputKeys.DEPTHS_COLOR]
cv2.imwrite('result.jpg', depth_vis)

```

### 模型性能
kitti dataset
| Base Network | AbsRel | SqRel | RMSE | RMSElog | SILog |
| :--- | :---: |  :---: |  :---: |  :---: |  :---: |
| DenseNet161 | 0.06 | 0.29 | 3.03 | 0.1 | 9.83 |

### Citation
```
@article{lee2019big,
  title={From big to small: Multi-scale local planar guidance for monocular depth estimation},
  author={Lee, Jin Han and Han, Myung-Kyu and Ko, Dong Wook and Suh, Il Hong},
  journal={arXiv preprint arXiv:1907.10326},
  year={2019}
}
@misc{ErenBalatkan/Bts-PyTorch,
      title={https://github.com/ErenBalatkan/Bts-PyTorch}
}
```
