Skip to content

Incorrect TensorRT inference after ONNX export with dynamic shapes (batch size >= 1) #1

@DLegushev

Description

@DLegushev

Description:
When exporting a YOLOX-S model to ONNX with dynamic input shapes, the subsequent conversion to TensorRT produces incorrect inference results for batch size >= 1.

Observed behavior:

  • ONNX model exported with dynamic batch dimension
  • TensorRT engine built from this ONNX model
  • Inference results are incorrect for batch size >= 1
  • Bounding boxes are corrupted, inconsistent, or mismatched to inputs

Expected behavior:

  • TensorRT inference should produce correct bounding boxes for any batch size, consistent with PyTorch / static-shape ONNX results

Notes:

  • Issue does not occur with static-shape ONNX export
  • Suspected problem in ONNX export or dynamic shape handling during TensorRT conversion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions