导出zoedepth的onnx模型并基于gradio实现在线部署

运行环境说明,其依赖: torch + python-opencv + onnxruntime + gradio + numpy + einops
导出onnx后运行环境依赖: python-opencv + onnxruntime + gradio + numpy + einops

1、 前置修改

1.1 ZoeDepth运行前准备

参考使用ZoeDepth生成深度估计图 ,下载项目:https://github.com/isl-org/ZoeDepth

同时参考该章节中的2.3修改代码,最终实现能在pytorch环境下进行推理

1.2 nn.functional.interpolate报错修改

报错信息如下所示:

File “C:\Users\Administrator\miniconda3\lib\site-packages\torch\nn\functional.py”, line 3924, in interpolate
raise TypeError(
TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class ‘numpy.int32’>, <class ‘numpy.int32’>]

将 C:\Users\Administrator\miniconda

最近更新

  1. TCP协议是安全的吗?

    2024-01-21 00:32:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-21 00:32:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-21 00:32:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-21 00:32:01       20 阅读

热门阅读

  1. Spring MVC学习之——上传文件

    2024-01-21 00:32:01       44 阅读
  2. 力扣54. 螺旋矩阵

    2024-01-21 00:32:01       42 阅读
  3. logback日志记录器

    2024-01-21 00:32:01       33 阅读
  4. C# 十大排序算法

    2024-01-21 00:32:01       30 阅读
  5. 第二章 变量与基本类型(上)

    2024-01-21 00:32:01       27 阅读
  6. 在vue中如何优雅的封装第三方组件

    2024-01-21 00:32:01       46 阅读
  7. 【Effective C++】让自己习惯C++

    2024-01-21 00:32:01       38 阅读
  8. 关于Qt Creator 的项目创建

    2024-01-21 00:32:01       39 阅读
  9. 10 快速排序-左右指针法

    2024-01-21 00:32:01       33 阅读
  10. 根据自己修改后的容器制作镜像并上传docker hub

    2024-01-21 00:32:01       34 阅读