Unverified 提交 e0c3f42d authored 作者: Jebastin Nadar's avatar Jebastin Nadar 提交者: GitHub

Uncomment OpenCV 4.5.4 requirement in detect.py (#5305)

上级 79d8f1f6
...@@ -89,7 +89,7 @@ def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s) ...@@ -89,7 +89,7 @@ def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval() modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval()
elif onnx: elif onnx:
if dnn: if dnn:
# check_requirements(('opencv-python>=4.5.4',)) check_requirements(('opencv-python>=4.5.4',))
net = cv2.dnn.readNetFromONNX(w) net = cv2.dnn.readNetFromONNX(w)
else: else:
check_requirements(('onnx', 'onnxruntime-gpu' if torch.has_cuda else 'onnxruntime')) check_requirements(('onnx', 'onnxruntime-gpu' if torch.has_cuda else 'onnxruntime'))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论