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

Dynamic batchsize export support for ONNX and TensorRT #280

Closed
wants to merge 11 commits into from

Conversation

philipp-schmidt
Copy link
Contributor

This PR enables the "--dynamic-batch" option for ONNX export. This will set the input dimension of the network to [batch,3,640,640] and allows arbitrary batch sizes to be run with the model.

Working Colab Demo:
https://colab.research.google.com/drive/1vH5wwUvWoGrJ989EzNcESs1tFxW6i1K7?usp=sharing

Netron Info:
image

Works with NMS plugin:
image

TensorRT now enables optimization profiles for arbitrary batch sizes:
image

1900 FPS on RTX 3090 for yolov7-tiny (batch size 16 in this screenshot)
image

Also a few additional refactoring changes - e.g. to set score_thresh and detections_per_image for NMS plugin

@philipp-schmidt
Copy link
Contributor Author

#329 contains the same changes for upstream changes to ONNX and TensorRT export
Discussed in #273 (comment)

Closing on favor of #329

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

Successfully merging this pull request may close these issues.

1 participant