YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

Update yolox.cpp: fix INPUT_BLOB_NAME & OUTPUT_BLOB_NAME

Open michelpromonet opened this issue 1 year ago • 1 comments
trafficstars

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.

michelpromonet avatar Jun 21 '24 12:06 michelpromonet

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 21 '24 12:06 CLAassistant

LGTM.

FateScript avatar Jul 10 '24 11:07 FateScript

This change does not work with torch2trt converted models.

starlipernl avatar Jul 26 '24 15:07 starlipernl

does not work with torch2trt converted models.

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

FateScript avatar Jul 29 '24 08:07 FateScript

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.

michelpromonet avatar Jul 30 '24 06:07 michelpromonet

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 avatar Jul 30 '24 16:07 starlipernl

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

starlipernl avatar Jul 30 '24 16:07 starlipernl

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

FateScript avatar Jul 31 '24 03:07 FateScript