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
107 stars 7 forks source link

yolov8 seg failed #7

Closed apanand14 closed 1 year ago

apanand14 commented 1 year ago

Hello I'm trying inference with your script and some changes for yolov8 seg. But unfortunately I'm getting some error. If possible then can you please look into it and give me the hint where is the fault. Thank you in advance

Error looks like

> find_blob_index_by_name images failed
> Try
> find_blob_index_by_name output0 failed
> Try
> find_blob_index_by_name output1 failed
> Try
> 
> Thread 1 "yolov8" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7faa74b00 (LWP 602)]
> generate_proposals (grid_strides=std::vector of length 6720, capacity 6720 = {...}, pred=..., prob_threshold=0.400000006, objects=std::vector of length 0, capacity 0) at /root/.vs/yolov8ncnn.cpp:312
> 312               float confidence = scores[k];
> Segmentation fault
Qengineering commented 1 year ago

By the looks of it, you are using another yolov8 model compared to the one at this repo. These errors indicate other layer names than the original ones. You can use Netron to look at the topology and find the correct names. However, it is not a guarantee that your model will work.

apanand14 commented 1 year ago

Yes. I'm using custom model. layer names I checked and exactly the same as it's required but thank you for the input. I will try to solve it.

apanand14 commented 1 year ago

I was loading the model wrongly. Working well now. Thank you for your input

asesorov commented 1 year ago

I was loading the model wrongly. Working well now. Thank you for your input

Sorry, I'm facing the same issue now. Could you please explain in details how you managed to fix it and how do you load it correctly?

Qengineering commented 1 year ago

Still, you have the task (or nightmare) of porting your YoloV8 to ncnn. I've use a off-the-shelf model. No need to do anything on modifications the model. see: https://github.com/FeiGeChuanShu/ncnn-android-yolov8 and: https://github.com/Digital2Slave/ncnn-android-yolov8-seg/wiki/Convert-yolov8%E2%80%90seg-to-ncnn-model-step-by-step