Qengineering / YoloV8-ncnn-Raspberry-Pi-4

YoloV8 for a bare Raspberry Pi 4 or 5
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
99 stars 7 forks source link

Segmentation fault when using custom Yolov8 model #8

Closed HadySK closed 5 months ago

HadySK commented 5 months ago

Good Morning,

I'm trying to run my custom trained model and I keep getting segmentation fault. I saw the other issue on this repo with a similar problem, and tried everything to modify the head.py and module.py in ultralytics files and regenerate the model, but nothing works segmentationFault

Tried to follow this tutorial and other modification recommended on github but didnt get any result. the model in the repo works fine https://portrait.gitee.com/FunXiaoYuZhou/YOLOv8-Custom-Object-Detection-Android https://github.com/s1091845/yolov8ncnn?tab=readme-ov-file

attached is my original model .pt file and my failed conversion bin and param.

https://drive.google.com/drive/folders/1bN1Uo4Dpje-OMFR2bxTbPL7_YkyA6sWj?usp=sharing

Appreciate any help.

Thanks

HadySK commented 5 months ago

figured it out, needed to modify number of classes in YoloV8.cpp num_class from 80 to match my model,