Views
No views yet
1git clone https://github.com/DepthAnything/PromptDA.git
2cd PromptDA
3pip install -r requirements.txt
4pip install -e .1from promptda.promptda import PromptDA
2from promptda.utils.io_wrapper import load_image, load_depth, save_depth
3
4DEVICE = 'cuda'
5image_path = "assets/example_images/image.jpg"
6prompt_depth_path = "assets/example_images/arkit_depth.png"
7image = load_image(image_path).to(DEVICE)
8prompt_depth = load_depth(prompt_depth_path).to(DEVICE) # 192x256, ARKit LiDAR depth in meters
9
10model = PromptDA.from_pretrained("depth-anything/prompt-depth-anything-vits-transparent").to(DEVICE).eval()
11depth = model.predict(image, prompt_depth) # HxW, depth in meters
12
13save_depth(depth, prompt_depth=prompt_depth, image=image)1@inproceedings{lin2024promptda,
2 title={Prompting Depth Anything for 4K Resolution Accurate Metric Depth Estimation},
3 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},
4 journal={arXiv},
5 year={2024}
6}