-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guide to export custom yolo models #51
Comments
@hardikdava Decoding depends on each Yolo version (or sometimes even release...), and some versions use the same decoding approach. You can find how this is done by looking into heads of each Yolo version (example here). In tools, we prune the head, add the sigmoid activation (due to legacy reasons as YoloV4 and V5 used it as well), and then decode it based on the version we read from the layer name. In YoloV5 example we do exactly the same decoding as the head does, just it is instead done in the FW and we don't use sigmoid since it's already added to the model. After we get out the bounding boxes, then we pass this to NMS (which is the same for all Yolos) and get a final list of bounding boxes. If you are interested in doing decoding of a specific Yolo version on device, you can compare if the bounding box decoding matches any of the supported version.
|
@tersekmatija , thanks for your reply. I want to run damo-yolo detection model. The onnx model has 2 output nodes i.e. boxes (in the form of xyxy) and scores (shape = (number of classes, 1)). Since the boxes are already in the form of xyxy, I think I may not require decoding. But I have to find best class and then pass it to nms. The numpy operations are as follows.
|
Yeah, that's already wrapped by their API. You can look here. I'd have to look deeper and investigate to see if it matches any of the current versions but will not have the time to do so anytime soon. It also seems the accuracy is not that much better and latency is measured on T4 which can deviate from OAK-D. We could perhaps look into exposing the NMS node? CC: @themarpe |
@tersekmatija actually, if you expose NMS is a good idea. That will bring easy to extend custom models fully compatible to run inside device itself. |
Hello,
The text was updated successfully, but these errors were encountered: