promptda / README.md
haotongl
inital version
37cca23
|
raw
history blame
1.45 kB

Prompt Depth Anything

0. Table of Contents

  1. Installation
  2. Usage
  3. Examples
    1. Testing with Your Own iPhone Capture
    2. Testing with vehicle LiDAR

1. Installation

git clone https://github.com/DepthAnything/PromptDA.git
cd PromptDA
pip install -r requirements.txt
pip install -e .

2. Usage

from promptda.promptda import PromptDA
from promptda.utils.io_wrapper import load_image, load_depth, save_depth

image_path = "assets/example_images/image.jpg"
prompt_depth_path = "assets/example_images/arkit_depth.png"
image = load_image(image_path)
# 192x256, ARKit LiDAR depth in meters
prompt_depth = load_depth(prompt_depth_path)

model = PromptDA().to("cuda").eval()
depth = model.predict(image, prompt_depth)

save_depth(depth, prompt_depth=prompt_depth, image=image)

3. Examples

3.1 Testing with Your Own iPhone Capture

3.2 Testing with vehicle LiDAR

Citation

If you find this project useful, please consider citing:

@article{lin2024promptda,
  title={Prompting Depth Anything for 4K Resolution Accurate Metric Depth Estimation},
  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},
  journal={arXiv},
  year={2024}
}