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?
Electr1
February 14, 2024, 11:05am
2
@Agent_kapo same issue discussed here, please check the thread to obtain the solution
Hello @Arjun_Gupta ,
[image]
First, strides have three, [8, 16, 32].
[image]
Second, the predictions you reshape into [144, 8400], so the len(predictions) is 144 and the shape of predictions[i][80:] is[1, 8320].
Third, you need to do softmax for four part separately. Divide [64, :] into [16, :]×4 and do softmax for each part.
Last, you missed this step.
Blockquote
Then, each part does softmax and multiplies a constant matrix. The constant matrix is 0-15, shape(1, 16).
The constant m…
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
Electr1
February 15, 2024, 1:04am
4
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?
Electr1
February 15, 2024, 2:47pm
6
@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