在下载完与训练模型之后进行简单的调用测试报错:
import imp
[2021-09-10 11:53:54,766] [ WARNING] - An error was encountered while loading MiDaS_Small. Detailed error information can be found in the C:\Users\Administrator\.paddlehub\log\20210910.log.
[2021-09-10 11:53:54,768] [ WARNING] - An error was encountered while loading MiDaS_Small. Detailed error information can be found in the C:\Users\Administrator\.paddlehub\log\20210910.log.
Download https://bj.bcebos.com/paddlehub/paddlehub_dev/MiDaS_Small.tar.gz
[######################################### ] 83.13%
[2021-09-10 11:54:22,184] [ WARNING] - An error was encountered while loading MiDaS_Small. Detailed error information can be found in the C:\Users\Administrator\.paddlehub\log\20210910.log.
[2021-09-10 11:54:22,197] [ WARNING] - An error was encountered while loading MiDaS_Small. Detailed error information can be found in the C:\Users\Administrator\.paddlehub\log\20210910.log.
错误日志内容为:
Record at 2021-09-10 11:40:55
==================================================
Traceback (most recent call last):
File "D:\tool\Miniconda3\envs\py36\lib\site-packages\paddlehub\module\manager.py", line 224, in search
module = self._local_modules[name] = HubModule.load(module_dir)
File "D:\tool\Miniconda3\envs\py36\lib\site-packages\paddlehub\module\module.py", line 418, in load
py_module = utils.load_py_module(dirname, '{}.module'.format(basename))
File "D:\tool\Miniconda3\envs\py36\lib\site-packages\paddlehub\utils\utils.py", line 248, in load_py_module
py_module = importlib.import_module(py_module_name)
File "D:\tool\Miniconda3\envs\py36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 945, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'MiDaS_Small.module'; 'MiDaS_Small' is not a package
已经确认过paddle版本和paddlehub版本满足要求
求问原因,谢谢大佬们
报错没找到 MiDaS_Small.module 这个模块,用 hub install 重新安装下试试