(深度估计学习)Win11复现DepthFM

目录

论文链接:https://depthfm.github.io/

讲解链接:https://www.php.cn/faq/734404.html

1. 系统配置

本人系统:Win11 CUDA12.2 python3.11.5

这里附上几个CUDA安装链接:

  1. 安装CUDA和CudaNN
  2. CUDA Toolkit 12.2 Update 2 Downloads
  3. cuDNN Archive,这里我选择的:Download cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x
  4. windows下切换不同版本cuda

2. 拉取代码,配置环境

首先,克隆 github 仓库

shell 复制代码
git clone git@github.com:CompVis/depth-fm.git
cd depth-fm

下载权重

shell 复制代码
Invoke-WebRequest -Uri "https://ommer-lab.com/files/depthfm/depthfm-v1.ckpt" -OutFile "checkpoints/depthfm-v1.ckpt"                          

创建 conda 环境。这里我之前的环境是cuda11.8就失败了,然后换到了cuda12.2

python 复制代码
conda env create -f environment.yml

3.开始深度预测

python 复制代码
python inference.py \
   --num_steps 2 \
   --ensemble_size 4 \
   --img assets/dog.png \
   --ckpt checkpoints/depthfm-v1.ckpt

但是此时报错了:
OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.

在项目的issue中找到了解决方法:https://github.com/CompVis/depth-fm/issues/16

一句命令解决huggingface.co无法下载模型问题

在windows里面直接设置环境变量

接下来重新运行python inference.py

4.运行结果

相关推荐
西岸行者3 天前
学习笔记:SKILLS 能帮助更好的vibe coding
笔记·学习
悠哉悠哉愿意3 天前
【单片机学习笔记】串口、超声波、NE555的同时使用
笔记·单片机·学习
别催小唐敲代码3 天前
嵌入式学习路线
学习
毛小茛3 天前
计算机系统概论——校验码
学习
babe小鑫3 天前
大专经济信息管理专业学习数据分析的必要性
学习·数据挖掘·数据分析
winfreedoms3 天前
ROS2知识大白话
笔记·学习·ros2
在这habit之下3 天前
Linux Virtual Server(LVS)学习总结
linux·学习·lvs
我想我不够好。3 天前
2026.2.25监控学习
学习
im_AMBER3 天前
Leetcode 127 删除有序数组中的重复项 | 删除有序数组中的重复项 II
数据结构·学习·算法·leetcode
CodeJourney_J3 天前
从“Hello World“ 开始 C++
c语言·c++·学习