I want to create an optimized model for ONNX CPU.
My code for exporting the model:
model_path = "./model/raw"
model = ModelManager.get(model_path)
runtime = RuntimeType.ONNX_CPU
optimized_model = model.export(runtime_type=runtime,
image_size=640,
device="cpu",
out_dir="./model/cpu",
overwrite=True)
For inference I am using the following code:
infer_model = InferModel(model_dir="./model/cpu",
runtime_type=RuntimeType.ONNX_CPU)
result = infer_model.infer("./image/raw/20230703_102957_38_2490-2093-1352-12.png",
annotate=True)
I am getting the following error:
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU
Am I doing sth wrong?
I saw that in infer/infer_model.py line 178 the device is hardcoded to cuda. If I change it to "cpu" it works.
Can you confirm that this is a bug or have I initialized my onnx cpu model in a wrong way?
I want to create an optimized model for ONNX CPU.
My code for exporting the model:
For inference I am using the following code:
I am getting the following error:
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU
Am I doing sth wrong?
I saw that in infer/infer_model.py line 178 the device is hardcoded to cuda. If I change it to "cpu" it works.
Can you confirm that this is a bug or have I initialized my onnx cpu model in a wrong way?