Use new OpenVINO API instead of deprecated (#736)

pull/774/head
Adrian Boguszewski 2 years ago committed by GitHub
parent 522f1937ed
commit b83374b42d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      requirements.txt
  2. 4
      ultralytics/yolo/engine/exporter.py

@ -31,7 +31,7 @@ seaborn>=0.11.0
# scikit-learn==0.19.2 # CoreML quantization # scikit-learn==0.19.2 # CoreML quantization
# tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos) # tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos)
# tensorflowjs>=3.9.0 # TF.js export # tensorflowjs>=3.9.0 # TF.js export
# openvino-dev # OpenVINO export # openvino-dev>=2022.1 # OpenVINO export
# Extras -------------------------------------- # Extras --------------------------------------
ipython # interactive notebook ipython # interactive notebook

@ -320,9 +320,9 @@ class Exporter:
def _export_openvino(self, prefix=colorstr('OpenVINO:')): def _export_openvino(self, prefix=colorstr('OpenVINO:')):
# YOLOv8 OpenVINO export # YOLOv8 OpenVINO export
check_requirements('openvino-dev') # requires openvino-dev: https://pypi.org/project/openvino-dev/ 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 = str(self.file).replace(self.file.suffix, f'_openvino_model{os.sep}')
f_onnx = self.file.with_suffix('.onnx') f_onnx = self.file.with_suffix('.onnx')

Loading…
Cancel
Save