PromptDA

DepthAnythingApache-2.0更新放缓

用提示(如稀疏深度点或相机位姿)引导单目深度估计,输出高精度、尺度一致的深度图,用于三维重建和机器人抓取。

[CVPR 2025] Prompt Depth Anything

暂无版本1,183star74fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/DepthAnything/PromptDA.git
cd PromptDA
pip install -r requirements.txt
pip install -e .
硬件要求按 README 说明

README 未明确给出显存要求;示例代码使用 DEVICE = 'cuda',需 NVIDIA GPU 环境。自行采集数据需 iPhone 12 Pro 及以后 Pro 机型,或 iPad 2020 Pro 及以后 Pro 机型。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 Depth Anything 的度量深度估计模型,用低分辨率 LiDAR 深度作提示,输出 4K 分辨率精确米制深度

用提示(如稀疏深度点或相机位姿)引导单目深度估计,输出高精度、尺度一致的深度图,用于三维重建和机器人抓取。

核心能力

  • 以 ARKit LiDAR 低分辨率深度作为提示,引导模型预测
  • 输出 4K 分辨率、以米为单位的度量深度图
  • 提供 Large 340M 与 Small 25.1M 两档预训练权重
  • Small-Transparent 版本针对透明物体微调
  • 支持用 Stray Scanner 采集的 iPhone 数据推理并生成视频

容易踩的坑

预训练权重需从 Hugging Face 单独下载,不会随代码仓库提供;生成视频需额外执行 sudo apt install ffmpeg;自行采集数据依赖 Stray Scanner App 和 Pro 机型 iPhone/iPad。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Prompting Depth Anything for 4K Resolution Accurate Metric Depth Estimation

    Project Page | Paper | Hugging Face Demo | Interactive Results | Data

    Prompting Depth Anything for 4K Resolution Accurate Metric Depth Estimation
    Haotong Lin, Sida Peng, Jingxiao Chen, Songyou Peng, Jiaming Sun, Minghuan Liu, Hujun Bao, Jiashi Feng, Xiaowei Zhou, Bingyi Kang
    CVPR 2025

    teaser

    📰 News

    🛠️ Installation

    git clone https://github.com/DepthAnything/PromptDA.git
    cd PromptDA
    pip install -r requirements.txt
    pip install -e .
    sudo apt install ffmpeg  # for video generation
    
    ModelParamsCheckpoint
    Prompt-Depth-Anything-Large340MDownload
    Prompt-Depth-Anything-Small25.1MDownload
    Prompt-Depth-Anything-Small-Transparent25.1MDownload

    Only Prompt-Depth-Anything-Large is used to benchmark in our paper. Prompt-Depth-Anything-Small-Transparent is further fine-tuned 10K steps with hammer dataset with our iPhone lidar simulation method to improve the performance on transparent objects.

    🚀 Usage

    from promptda.promptda import PromptDA
    from promptda.utils.io_wrapper import load_image, load_depth, save_depth
    
    DEVICE = 'cuda'
    image_path = "assets/example_images/image.jpg"
    prompt_depth_path = "assets/example_images/arkit_depth.png"
    image = load_image(image_path).to(DEVICE)
    prompt_depth = load_depth(prompt_depth_path).to(DEVICE) # 192x256, ARKit LiDAR depth in meters
    
    model = PromptDA.from_pretrained("depth-anything/prompt-depth-anything-vitl").to(DEVICE).eval()
    depth = model.predict(image, prompt_depth) # HxW, depth in meters
    
    save_depth(depth, prompt_depth=prompt_depth, image=image)
    

    📸 Running on your own capture

    You can use Stray Scanner App to capture your own data, which requires iPhone 12 Pro or later Pro models, iPad 2020 Pro or later Pro models. We setup a Hugging Face Space for you to quickly test our model. If you want to obtain video results, please follow the following steps.

    1. Capture a scene with the Stray Scanner App. (The charging port is preferred to face downward or to the right.)
    2. Use the iPhone Files App to compress it into a zip file and transfer it to your computer. Here is an example screen recording.
    3. Run the following commands to infer our model and generate the video results.
    export PATH_TO_ZIP_FILE=data/8b98276b0a.zip # Replace with your own zip file path
    export PATH_TO_SAVE_FOLDER=data/8b98276b0a_results # Replace with your own save folder path
    python3 -m promptda.scripts.infer_stray_scan --input_path ${PATH_TO_ZIP_FILE} --output_path ${PATH_TO_SAVE_FOLDER}
    python3 -m promptda.scripts.generate_video process_stray_scan --input_path ${PATH_TO_ZIP_FILE} --result_path ${PATH_TO_SAVE_FOLDER}
    ffmpeg -framerate 60 -i ${PATH_TO_SAVE_FOLDER}/%06d_smooth.jpg  -c:v libx264 -pix_fmt yuv420p ${PATH_TO_SAVE_FOLDER}.mp4
    

    👏 Acknowledgements

    We thank the generous support from Prof. Weinan Zhang for robot experiments, including the space, objects and the Unitree H1 robot. We also thank Zhengbang Zhu, Jiahang Cao, Xinyao Li, Wentao Dong for their help in setting up the robot platform and collecting robot data.

    📚 Citation

    If you find this code useful for your research, please use the following BibTeX entry

    @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}
    }