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

TensorRT / ONNX output only one box #159

Closed
defrag-bambino opened this issue Dec 14, 2023 · 0 comments
Closed

TensorRT / ONNX output only one box #159

defrag-bambino opened this issue Dec 14, 2023 · 0 comments

Comments

@defrag-bambino
Copy link

defrag-bambino commented Dec 14, 2023

Hello,

I have trained RT-DETR using Paddle. Then I exported it as described in the README and in various previous issues (e.g. #95). However, I get a strange output:

these are the trt bindings:

m_shape: shape: (1, 2), dtype: <class 'numpy.float32'>, mode: TensorIOMode.INPUT
image: shape: (-1, 4, 640, 640), dtype: <class 'numpy.float32'>, mode: TensorIOMode.INPUT
scale_factor: shape: (1, 2), dtype: <class 'numpy.float32'>, mode: TensorIOMode.INPUT
tile_3.tmp_0: shape: (), dtype: <class 'numpy.int32'>, mode: TensorIOMode.OUTPUT
reshape2_56.tmp_0: shape: (-1, 6), dtype: <class 'numpy.float32'>, mode: TensorIOMode.OUTPUT

notice how tile_3.tmp_0 has shape (). The reshape2_56.tmp_0 hast shape (batch, 6), which seems to be correct.

The output of the network for a batch size of 9 is a single (label, score, bbox) for each of the 9 images:
image
The tile_3.tmp_0 output produces a single value of "300". The single bbox seems to be the one with the highest confidence.

Any ideas what may cause this?

Viewing the ONNX with www.netron.app shows this:
image

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

1 participant