linhaotong
commited on
Commit
·
f902894
1
Parent(s):
4f69410
update model card
Browse files
README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: depth-estimation
|
| 4 |
---
|
| 5 |
+
|
| 6 |
+
# Prompt-Depth-Anything-Vits-Transparent
|
| 7 |
+
|
| 8 |
+
## Introduction
|
| 9 |
+
|
| 10 |
+
Prompt Depth Anything is a high-resolution and accurate metric depth estimation method, with the following highlights:
|
| 11 |
+
- using prompting to unleash the power of depth foundation models, inspired by success of prompting in VLM and LLM foundation models.
|
| 12 |
+
- The widely available iPhone LiDAR is taken as the prompt, guiding the model to produce up to 4K resolution accurate metric depth.
|
| 13 |
+
- A scalable data pipeline is introduced to train the method.
|
| 14 |
+
- Prompt Depth Anything benefits downstream applications, including 3D reconstruction and generalized robotic grasping.
|
| 15 |
+
|
| 16 |
+
## Installation
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
git clone https://github.com/DepthAnything/PromptDA.git
|
| 20 |
+
cd PromptDA
|
| 21 |
+
pip install -r requirements.txt
|
| 22 |
+
pip install -e .
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from promptda.promptda import PromptDA
|
| 29 |
+
from promptda.utils.io_wrapper import load_image, load_depth, save_depth
|
| 30 |
+
|
| 31 |
+
DEVICE = 'cuda'
|
| 32 |
+
image_path = "assets/example_images/image.jpg"
|
| 33 |
+
prompt_depth_path = "assets/example_images/arkit_depth.png"
|
| 34 |
+
image = load_image(image_path).to(DEVICE)
|
| 35 |
+
prompt_depth = load_depth(prompt_depth_path).to(DEVICE) # 192x256, ARKit LiDAR depth in meters
|
| 36 |
+
|
| 37 |
+
model = PromptDA.from_pretrained("depth-anything/prompt-depth-anything-vits-transparent").to(DEVICE).eval()
|
| 38 |
+
depth = model.predict(image, prompt_depth) # HxW, depth in meters
|
| 39 |
+
|
| 40 |
+
save_depth(depth, prompt_depth=prompt_depth, image=image)
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Citation
|
| 44 |
+
|
| 45 |
+
If you find this project useful, please consider citing:
|
| 46 |
+
|
| 47 |
+
```bibtex
|
| 48 |
+
@inproceedings{lin2024promptda,
|
| 49 |
+
title={Prompting Depth Anything for 4K Resolution Accurate Metric Depth Estimation},
|
| 50 |
+
author={Lin, Haotong and Peng, Sida and Chen, Jingxiao and Peng, Songyou and Sun, Jiaming and Liu, Minghuan and Bao, Hujun and Feng, Jiashi and Zhou, Xiaowei and Kang, Bingyi},
|
| 51 |
+
journal={arXiv},
|
| 52 |
+
year={2024}
|
| 53 |
+
}
|