Skip to content
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

onnx model output conflicts #3

Closed
asdemirel opened this issue Nov 12, 2024 · 1 comment
Closed

onnx model output conflicts #3

asdemirel opened this issue Nov 12, 2024 · 1 comment

Comments

@asdemirel
Copy link

Hello,
I dowloanded public yolov9-m-converted.pt model on WongKinYiu/yolov9. And I converted model pt to onnx with export.py. Then I deployed model on triton inference server. Model output dimension is :
{
name: "output0"
data_type: TYPE_FP16
dims: [
1,
84,
8400
]
}

So I use client.py but output layer is not include ["num_dets", "det_boxes", "det_scores", "det_classes"]. So I have an error message. Your model and my model why did different? How parse is it ?

@levipereira
Copy link
Owner

levipereira commented Nov 19, 2024

Sorry for the delay in responding.

The original YOLOv9c models do not include the NMS functionality, so the model's output is raw data containing all detections made by the neural network.

I implemented a NMS solution within the model's final stage to filter these raw detections before returning the output to the client, making it end-to-end (E2E).

You need to export the .pt model to ONNX with this functionality enabled. This way, you can use the model in TensorRT, which already expects the output layers to include ["num_dets", "det_boxes", "det_scores", "det_classes"]

You can export using original codebase of yolov9:

python3 export.py --weights ./yolov9-c.pt --imgsz 640 --simplify --include onnx_end2end

WongKinYiu/yolov9#130

Or You can use this repo:
https://github.com/levipereira/yolo_e2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants