Failed to execute script pegasus

Decided to train a second model with KSNN and when started converting my weights, got this:


What does it mean?
Im using usual pretained Yolov8:

model = Yolo(‘yolov8n-face.pt’)
results = model.train(data=“…”, epochs=100, batch=4, imgsz=640, device=0)

Then I’m converting pt weighys in onnx using your fix to head.py (I changed it in my site-packages dir)

The only one difference - Now I’m maybe using newer torch version + before I was training my dataset on windows, now on ubuntu

Can you help me?

@Agent_kapo same issue discussed here, please check the thread to obtain the solution

Thank u, I was wondering that problems lies somewhere here, but it’s strange, I’ve changed Yolov8n head.py which lies in my venv and it still keep returning me the same results…

Okay

Also I have another question
When you convert your model you have to put mean & std
–mean-values ‘0 0 0 0.00392156’
You have here only 4 values and all of them 0-1
How do you compute these values?
Normally I get 3 numbers 0-255 for mean and 3 numbers 0-255 for std

This is mean value to be applied to NHWC order, it’s for normalizing it to INT8 only on the channel layer.

Regards.

Still getting wrong size after converting
Im getting 1X27X20X20 and two other heads
What I’m doing wrong?

Maybe its yolov8 version or torch version?

@Agent_kapo not sure, I think it could be related to the version of torch

Please check from the thread to verify if you are using the same version.

where I can look for the versions?
I found only this and it’s looks strange that torch is 1.1o.1

Because Yolov8 requires torch>=1.8.0