🚀 Prompt-Depth-Anything-Vits
Prompt-Depth-Anything-Vits 是一種高分辨率且精確的度量深度估計方法,可利用提示技術挖掘深度基礎模型的潛力,為 3D 重建和機器人抓取等下游應用提供支持。
🚀 快速開始
Prompt Depth Anything 是一種高分辨率且精確的度量深度估計方法,具有以下亮點:
- 受視覺語言模型(VLM)和大語言模型(LLM)中提示技術成功應用的啟發,使用提示技術挖掘深度基礎模型的潛力。
- 以廣泛使用的 iPhone LiDAR 作為提示,引導模型生成高達 4K 分辨率的精確度量深度。
- 引入了可擴展的數據管道來訓練該方法。
- Prompt Depth Anything 有利於下游應用,包括 3D 重建和通用機器人抓取。
✨ 主要特性
- 提示驅動:藉助提示技術激發深度基礎模型的潛力。
- 高分辨率輸出:以 iPhone LiDAR 為提示,生成高達 4K 分辨率的精確度量深度。
- 可擴展訓練:採用可擴展的數據管道進行模型訓練。
- 應用廣泛:對 3D 重建和機器人抓取等下游應用有幫助。
💻 使用示例
基礎用法
import requests
from PIL import Image
from transformers import PromptDepthAnythingForDepthEstimation, PromptDepthAnythingImageProcessor
url = "https://github.com/DepthAnything/PromptDA/blob/main/assets/example_images/image.jpg?raw=true"
image = Image.open(requests.get(url, stream=True).raw)
image_processor = PromptDepthAnythingImageProcessor.from_pretrained("depth-anything/prompt-depth-anything-vits-hf")
model = PromptDepthAnythingForDepthEstimation.from_pretrained("depth-anything/prompt-depth-anything-vits-hf")
prompt_depth_url = "https://github.com/DepthAnything/PromptDA/blob/main/assets/example_images/arkit_depth.png?raw=true"
prompt_depth = Image.open(requests.get(prompt_depth_url, stream=True).raw)
inputs = image_processor(images=image, return_tensors="pt", prompt_depth=prompt_depth)
with torch.no_grad():
outputs = model(**inputs)
post_processed_output = image_processor.post_process_depth_estimation(
outputs,
target_sizes=[(image.height, image.width)],
)
predicted_depth = post_processed_output[0]["predicted_depth"]
📄 許可證
本項目採用 Apache-2.0 許可證。
📚 詳細文檔
引用
如果您覺得這個項目有用,請考慮引用以下文獻:
@inproceedings{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}
}