onnx / models

A collection of pre-trained, state-of-the-art models in the ONNX format

Home Page:http://onnx.ai/models/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault when inferencing with yolov8 in c++

ashray21 opened this issue · comments

I'm getting a segmentation fault when inferencing using yolov8. I have checked every input and function arguments and it's correct. I have no idea why it's popping up.

Segmentation faults occurs here:
ThrowOnError(GetApi().Run(p_, run_options, input_names, ort_input_values, input_count, output_names, output_count, ort_output_values));

I have exported yolov8 as follows:
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
model.export(format="onnx",opset=12, imgsz=[640, 640])