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

Update yolox.cpp: fix INPUT_BLOB_NAME & OUTPUT_BLOB_NAME #1786

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

michelpromonet
Copy link
Contributor

Hi,

This merge request update the name of input & output blob name.
It allow to run tensorrt onnx models converted using trtexec --onnx=yolox_s.onnx --saveEngine=yolox_s.trt

Best Regards,
Michel.

@CLAassistant
Copy link

CLAassistant commented Jun 21, 2024

CLA assistant check
All committers have signed the CLA.

@FateScript
Copy link
Member

LGTM.

@FateScript FateScript merged commit a242a05 into Megvii-BaseDetection:main Jul 10, 2024
3 checks passed
@starlipernl
Copy link

This change does not work with torch2trt converted models.

@FateScript
Copy link
Member

does not work with torch2trt converted models.

Any extra information such as torch2trt version, error log etc.

@michelpromonet
Copy link
Contributor Author

Hi @starlipernl

I was not able to install trt2torch, in order to convert the model, I used :
trtexec --onnx=yolox_s.onnx --fp16 --saveEngine=yolox_s.trt

Best Regards,
Michel.

@starlipernl
Copy link

I used the latest release of both YOLOX and torch2trt with Tensorrt version 8.6.1. When trying to run the converted model with the cpp demo script I got the following error:
Cannot find binding of given name: images.

This is because torch2trt defaults to input_0 and output_0 for the binding names. There may be a way to specific the input and output name bindings during torch2trt conversion within the trt.py file in this repo I just did not dig too much into it.

@starlipernl
Copy link

I fixed it by just reverting the yolox.cpp script back to the original input and output names (input_0, output_0)

@FateScript
Copy link
Member

I have already reverted this pr in #1792.
@michelpromonet Your contribution is saved in README now.

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.

4 participants