Update check_requirements() single install (#9353)
* Update `check_requirements()` single install Faster install and better conflict resolution with single installation Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update * Update * Update Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
8aa196ce08
commit
24bf9cceb4
4 files changed
+32
-34
No files matched your search
+2
-2
@@ -347,7 +347,7 @@ class DetectMultiBackend(nn.Module):
|
||||
stride, names = int(d['stride']), d['names']
|
||||
elif dnn: # ONNX OpenCV DNN
|
||||
LOGGER.info(f'Loading {w} for ONNX OpenCV DNN inference...')
|
||||
check_requirements(('opencv-python>=4.5.4',))
|
||||
check_requirements('opencv-python>=4.5.4')
|
||||
net = cv2.dnn.readNetFromONNX(w)
|
||||
elif onnx: # ONNX Runtime
|
||||
LOGGER.info(f'Loading {w} for ONNX Runtime inference...')
|
||||
@@ -362,7 +362,7 @@ class DetectMultiBackend(nn.Module):
|
||||
stride, names = int(meta['stride']), eval(meta['names'])
|
||||
elif xml: # OpenVINO
|
||||
LOGGER.info(f'Loading {w} for OpenVINO inference...')
|
||||
check_requirements(('openvino',)) # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
||||
check_requirements('openvino') # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
||||
from openvino.runtime import Core, Layout, get_batch
|
||||
ie = Core()
|
||||
if not Path(w).is_file(): # if not *.xml
|
||||
|
||||
Reference in new issue
Block a user