参考文档:openvino api
# coding:UTF-8
import time
import cv2
import numpy as np
from openvino.runtime import Core
def openvino_inference(model_xml, model_bin, imgpath):
# 初始化推理引擎并显示信息
ie = Core()
for device in ie.available_devices:
device_name = ie.get_property(device_name=device, name="FULL_DEVICE_NAME")
print(f"{
device}: {
device_name}")
# 加载模型
model = ie.read_model(model=model_xml, weights=model_bin)
compiled_model = ie.compile_model(model=model,