Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question About Converting Official yolov8-seg to ONNX Format #46

Open
HsiaoCH opened this issue Dec 27, 2024 · 0 comments
Open

Question About Converting Official yolov8-seg to ONNX Format #46

HsiaoCH opened this issue Dec 27, 2024 · 0 comments

Comments

@HsiaoCH
Copy link

HsiaoCH commented Dec 27, 2024

Hello, author, thank you for your code; it has significantly sped up my development process.

I encountered an issue during usage:
I downloaded yolov8s-seg.pt from the official YOLO repository and used the following code to convert it to ONNX format:

from ultralytics import YOLO

model = YOLO("yolov8s-seg.pt")
model.export(format="onnx")

Afterward, when running the following in C#:

var results = yolo.RunSegmentation(image, 0.25, 0.65, 0.7);

I encountered the error:
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

However, if I use yolov8s-seg.onnx from YoloDotNet\test\assets\Models, there are no issues.

Out of curiosity and for learning purposes, I would like to know:

What is causing the error?
Is my method for converting yolov8s-seg.pt correct? If not, how can I correctly perform the conversion?
Looking forward to your response, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant