mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-24 05:55:51 +08:00
Update OpenVINO requirement to openvino>=2023.0
(#3722)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
201e69e4e4
commit
e2f9bba964
@ -32,7 +32,7 @@ seaborn>=0.11.0
|
|||||||
# tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos)
|
# tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos)
|
||||||
# tflite-support
|
# tflite-support
|
||||||
# tensorflowjs>=3.9.0 # TF.js export
|
# tensorflowjs>=3.9.0 # TF.js export
|
||||||
# openvino-dev>=2022.3 # OpenVINO export
|
# openvino-dev>=2023.0 # OpenVINO export
|
||||||
|
|
||||||
# Extras --------------------------------------
|
# Extras --------------------------------------
|
||||||
psutil # system utilization
|
psutil # system utilization
|
||||||
|
2
setup.py
2
setup.py
@ -48,7 +48,7 @@ setup(
|
|||||||
'mkdocs-redirects', # for 301 redirects
|
'mkdocs-redirects', # for 301 redirects
|
||||||
'mkdocs-ultralytics-plugin>=0.0.21', # for meta descriptions and images, dates and authors
|
'mkdocs-ultralytics-plugin>=0.0.21', # for meta descriptions and images, dates and authors
|
||||||
],
|
],
|
||||||
'export': ['coremltools>=6.0', 'openvino-dev>=2022.3', 'tensorflowjs'], # automatically installs tensorflow
|
'export': ['coremltools>=6.0', 'openvino-dev>=2023.0', 'tensorflowjs'], # automatically installs tensorflow
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
|
@ -135,7 +135,7 @@ class AutoBackend(nn.Module):
|
|||||||
metadata = session.get_modelmeta().custom_metadata_map # metadata
|
metadata = session.get_modelmeta().custom_metadata_map # metadata
|
||||||
elif xml: # OpenVINO
|
elif xml: # OpenVINO
|
||||||
LOGGER.info(f'Loading {w} for OpenVINO inference...')
|
LOGGER.info(f'Loading {w} for OpenVINO inference...')
|
||||||
check_requirements('openvino') # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
check_requirements('openvino>=2023.0') # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
||||||
from openvino.runtime import Core, Layout, get_batch # noqa
|
from openvino.runtime import Core, Layout, get_batch # noqa
|
||||||
core = Core()
|
core = Core()
|
||||||
w = Path(w)
|
w = Path(w)
|
||||||
@ -339,7 +339,7 @@ class AutoBackend(nn.Module):
|
|||||||
y = self.session.run(self.output_names, {self.session.get_inputs()[0].name: im})
|
y = self.session.run(self.output_names, {self.session.get_inputs()[0].name: im})
|
||||||
elif self.xml: # OpenVINO
|
elif self.xml: # OpenVINO
|
||||||
im = im.cpu().numpy() # FP32
|
im = im.cpu().numpy() # FP32
|
||||||
y = list(self.ov_compiled_model([im]).values())
|
y = list(self.ov_compiled_model(im).values())
|
||||||
elif self.engine: # TensorRT
|
elif self.engine: # TensorRT
|
||||||
if self.dynamic and im.shape != self.bindings['images'].shape:
|
if self.dynamic and im.shape != self.bindings['images'].shape:
|
||||||
i = self.model.get_binding_index('images')
|
i = self.model.get_binding_index('images')
|
||||||
|
@ -357,7 +357,7 @@ class Exporter:
|
|||||||
@try_export
|
@try_export
|
||||||
def export_openvino(self, prefix=colorstr('OpenVINO:')):
|
def export_openvino(self, prefix=colorstr('OpenVINO:')):
|
||||||
"""YOLOv8 OpenVINO export."""
|
"""YOLOv8 OpenVINO export."""
|
||||||
check_requirements('openvino-dev>=2022.3') # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
check_requirements('openvino-dev>=2023.0') # requires openvino-dev: https://pypi.org/project/openvino-dev/
|
||||||
import openvino.runtime as ov # noqa
|
import openvino.runtime as ov # noqa
|
||||||
from openvino.tools import mo # noqa
|
from openvino.tools import mo # noqa
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user