From b83374b42d69968696ac2dc125c49c0e8e6bb3c1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 2 Feb 2023 11:59:58 +0100 Subject: [PATCH] Use new OpenVINO API instead of deprecated (#736) --- requirements.txt | 2 +- ultralytics/yolo/engine/exporter.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8ea67d4..162096a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ seaborn>=0.11.0 # scikit-learn==0.19.2 # CoreML quantization # tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos) # tensorflowjs>=3.9.0 # TF.js export -# openvino-dev # OpenVINO export +# openvino-dev>=2022.1 # OpenVINO export # Extras -------------------------------------- ipython # interactive notebook diff --git a/ultralytics/yolo/engine/exporter.py b/ultralytics/yolo/engine/exporter.py index 3b6f92e..629fb96 100644 --- a/ultralytics/yolo/engine/exporter.py +++ b/ultralytics/yolo/engine/exporter.py @@ -320,9 +320,9 @@ class Exporter: def _export_openvino(self, prefix=colorstr('OpenVINO:')): # YOLOv8 OpenVINO export check_requirements('openvino-dev') # requires openvino-dev: https://pypi.org/project/openvino-dev/ - import openvino.inference_engine as ie # noqa + import openvino.runtime as ov # noqa - LOGGER.info(f'\n{prefix} starting export with openvino {ie.__version__}...') + LOGGER.info(f'\n{prefix} starting export with openvino {ov.__version__}...') f = str(self.file).replace(self.file.suffix, f'_openvino_model{os.sep}') f_onnx = self.file.with_suffix('.onnx')