运行环境说明,其依赖: torch + python-opencv + onnxruntime + gradio + numpy + einops
导出onnx后运行环境依赖: python-opencv + onnxruntime + gradio + numpy + einops
参考使用ZoeDepth生成深度估计图 ,下载项目:https://github.com/isl-org/ZoeDepth
同时参考该章节中的2.3修改代码,最终实现能在pytorch环境下进行推理
报错信息如下所示:
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