Qengineering / YoloV5-NPU

YoloV5 NPU for the RK3566/68/88
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
69 stars 11 forks source link

Where did the rknn model come from? #3

Open ststare opened 8 months ago

ststare commented 8 months ago

Hi! Can you tell me where you got the rknn model from? (yolov5s-640-640.rknn) Or if you converted a .pt model, how was it converted and where did this .pt model come from?

Qengineering commented 8 months ago

Take a look here: https://github.com/airockchip/rknn_model_zoo

ststare commented 8 months ago

Thanks for the answer!

I have already become acquainted with the models that are in this repository. I followed the instructions described in the documents rknn toolkit2 and from yolov5s.onnx (this file is located here ) received yolov5s.rknn . Now when I open this received model and the model that you have (I open it in the Netron-7.3.6.AppImage application), they differ in outputs and, in general, completely internal architecture. Therefore, your model was definitely not obtained from rknn_model_zoo. And if you did use their conversion method, what .onnx model did you use initially?

Screenshot

On the left is your model, on the right is the model from rknn_model_zoo.

Qengineering commented 8 months ago

OK. This can also be a candidate. I'm also not sure after all this time.

ststare commented 8 months ago

Unfortunately, this model is also different. I understand that you did not convert the model yourself, but found a ready-made one. Did I understand correctly?

But then how is main.cpp written and what variables may need to be changed regarding which .rknn model we are using.

Qengineering commented 8 months ago

Indeed I found a ready-made one. Main.cpp is more or less a copy of the given example by Radxa

ststare commented 8 months ago

Thank you for your sincere answer! I would be very grateful if you could tell me in more detail about example by Radxa or maybe give me a link.

And maybe the last question, do you know which variables are responsible for the parameters of the .rknn model? So I can try to understand how to change them, relative to my model

Qengineering commented 8 months ago

Did you see this video from a colleague?

ststare commented 8 months ago

Thanks, I'll take a look!