marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.45k stars 356 forks source link

Segmentation fault from a yolov8s onnx model #458

Closed mgabell closed 1 year ago

mgabell commented 1 year ago

Hi,

I have been trying to get my custom yolov8 model running. I trained it according to ultralytics, but after converting it and running the model (that works with coco dataset) i get the following issue.

gstname= video/x-raw features= <Gst.CapsFeatures object at 0xffff699aab80 (GstCapsFeatures at 0xfffec40196a0)> Segmentation fault (core dumped)

Do you have any idea where I can start looking?

This is my config file when training:

from ultralytics import YOLO
from ultralytics import settings

# Update a setting
settings.update({
    'api_key':'XXX'
#    'runs_dir': '/hdd/ultralytics/runs',
#    'datasets_dir':'/hdd/yolov8/datasets',
#    'weights_dir':'/hdd/yolov8/weights',
#    'runs_dir':'/hdd/YoloV8/ultralytics/runs',
#    'batch':'2000'
})

# Reset settings to default values
print(settings)

# Create a new YOLO model from scratch
model = YOLO('yolov8s.yaml')

# Train the model using the 'coco128.yaml' dataset for 3 epochs
results = model.train(data='./yaml/HSP_001.yaml', epochs=2000, batch=16)

# Evaluate the model's performance on the validation set
results = model.val()

This I then convert to ONNX acc. to your instructions...

marcoslucianops commented 1 year ago

https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/docs/YOLOv8.md

mgabell commented 1 year ago

Amazing. I thought I did just that. Thank you! Love the "slap in the face" comment :-). That worked. At least the model was picked up. Then its a matter of my training.

A question. Is it possible to have you as consultant? We can DM about it?