Closed ambitious-octopus closed 2 weeks ago
Update: found the notebook tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_export.ipynb
with an example of onnx import. It works, now I have a new missing operation:
Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from yolov8n_mct_model.onnx failed:Fatal error: Sony:MultiClassNMS(-1) is not a registered function/op
Download model here.
import mct_quantizers as mctq
import onnxruntime as ort
sess = ort.InferenceSession("yolov8n_mct_model.onnx",
mctq.get_ort_session_options(),
providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
Hi @ambitious-octopus ,
Can you try to add this additional import?
from sony_custom_layers.pytorch.object_detection import nms_ort
@Idan-BenAmi it works, thanks for that!
Issue Type
Bug
Source
pip (mct-nightly)
MCT Version
2.1.0
OS Platform and Distribution
Linux Ubuntu 22.04
Python version
3.10
Describe the issue
I followed the tutorial provided in
tutorials/notebooks/imx500_notebooks/pytorch/pytorch_yolov8n_for_imx500.ipynb
and successfully exported a model in ONNX format using MCT PTQ. However, when I attempt to load the model with ONNX, I encounter the following error:cc: @Idan-BenAmi
Expected behaviour
No response
Code to reproduce the issue
Log output
No response