Closed wc1229 closed 2 years ago
终端输入: python detection/det2d_onnx_inference.py -i /home/wc/wc/UniMOT/pof/images/1.jpg -o /home/wc/wc/UniMOT/pof/model/model_last.onnx 报错:
Traceback (most recent call last): File "detection/det2d_onnx_inference.py", line 8, in <module> from detection.yolov5.utils.augmentations import letterbox ModuleNotFoundError: No module named 'detection'
在py文件开头添加:
import sys sys.path.append('上层文件夹路径')
添加init.py文件,内容仿照以下格式
from . import mot from . import detection from .mot import * from .detection import *
问题已解决。
终端输入: python detection/det2d_onnx_inference.py -i /home/wc/wc/UniMOT/pof/images/1.jpg -o /home/wc/wc/UniMOT/pof/model/model_last.onnx 报错: