该模型当前使用的是默认介绍模版,处于“预发布”阶段,页面仅限所有者可见。
请根据模型贡献文档说明,及时完善模型卡片内容。ModelScope平台将在模型卡片完善后展示。谢谢您的理解。
Clone with HTTP
git clone https://www.modelscope.cn/Damo_XR_Lab/cv_marigold_monocular-depth-estimation.git
基于稳定扩散的仿射不变单目深度估计方法
任务
利用预训练的图像生成模型来调优深度估计任务,本算法可以获得SOTA的深度结果。
模型描述
效果展示
以下是在自然数据上的本方法和其他方法的深度结果对比
期望模型使用方式以及适用范围
本方法可以从单张图像中恢复深度结果,并通过给定相机参数,恢复对应的点云
运行环境
- 模型只支持GPU上运行,GPU显存要求大于等于24G
- 已在RTX4090及以上显卡上测试通过,具体效率与GPU性能相关,可能存在一些差异
模型局限性以及可能的偏差
如何使用
推理代码范例
使用预训练模型,按照下列代码可以进行推理
input_path = './data/in-the-wild_example/example_0.jpg'
output_path = './result.png'
pipe = pipeline(Tasks.image_depth_estimation,
model='Damo_XR_Lab/cv_marigold_monocular-depth-estimation')
results = pipe(input=input_path)
depth_val = results[OutputKeys.DEPTHS] # type: np.ndarray
print('the output depth shape is', depth_val.shape)
depth_vis = results[OutputKeys.DEPTHS_COLOR]
depth_vis.save(output_path)
print('the output image path is {}'.format(output_path))
训练代码范例
请参考训练过程
相关论文以及引用信息
@misc{ke2023repurposing,
title={Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation},
author={Bingxin Ke and Anton Obukhov and Shengyu Huang and Nando Metzger and Rodrigo Caye Daudt and Konrad Schindler},
year={2023},
eprint={2312.02145},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
评论