jebastin-nadar
commited on
Commit
•
e0c3f42
1
Parent(s):
79d8f1f
Uncomment OpenCV 4.5.4 requirement in detect.py (#5305)
Browse files
detect.py
CHANGED
@@ -89,7 +89,7 @@ def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
|
|
89 |
modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval()
|
90 |
elif onnx:
|
91 |
if dnn:
|
92 |
-
|
93 |
net = cv2.dnn.readNetFromONNX(w)
|
94 |
else:
|
95 |
check_requirements(('onnx', 'onnxruntime-gpu' if torch.has_cuda else 'onnxruntime'))
|
|
|
89 |
modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval()
|
90 |
elif onnx:
|
91 |
if dnn:
|
92 |
+
check_requirements(('opencv-python>=4.5.4',))
|
93 |
net = cv2.dnn.readNetFromONNX(w)
|
94 |
else:
|
95 |
check_requirements(('onnx', 'onnxruntime-gpu' if torch.has_cuda else 'onnxruntime'))
|