ultralytics 8.1.25 OpenVINO LATENCY and THROUGHPUT modes (#8058)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Adrian Boguszewski <adekboguszewski@gmail.com>
This commit is contained in:
parent
6da7c9fb21
commit
90943946a7
2 changed files with 112 additions and 36 deletions
|
|
@ -411,8 +411,8 @@ class Exporter:
|
|||
@try_export
|
||||
def export_openvino(self, prefix=colorstr("OpenVINO:")):
|
||||
"""YOLOv8 OpenVINO export."""
|
||||
check_requirements("openvino>=2023.3") # requires openvino: https://pypi.org/project/openvino-dev/
|
||||
import openvino as ov # noqa
|
||||
check_requirements("openvino>=2023.3") # requires openvino: https://pypi.org/project/openvino/
|
||||
import openvino as ov
|
||||
|
||||
LOGGER.info(f"\n{prefix} starting export with openvino {ov.__version__}...")
|
||||
assert TORCH_1_13, f"OpenVINO export requires torch>=1.13.0 but torch=={torch.__version__} is installed"
|
||||
|
|
@ -433,7 +433,7 @@ class Exporter:
|
|||
if self.model.task != "classify":
|
||||
ov_model.set_rt_info("fit_to_window_letterbox", ["model_info", "resize_type"])
|
||||
|
||||
ov.save_model(ov_model, file, compress_to_fp16=self.args.half)
|
||||
ov.runtime.save_model(ov_model, file, compress_to_fp16=self.args.half)
|
||||
yaml_save(Path(file).parent / "metadata.yaml", self.metadata) # add metadata.yaml
|
||||
|
||||
if self.args.int8:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue