Browse Source

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

modifyDataloader
Jebastin Nadar GitHub 2 years ago
parent
commit
e0c3f42de7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      detect.py

+ 1
- 1
detect.py View File

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'))

Loading…
Cancel
Save