cyrusbehr / tensorrt-cpp-api

TensorRT C++ API Tutorial
MIT License
577 stars 72 forks source link

dynamic shape #29

Closed lizexu123 closed 7 months ago

cyrusbehr commented 10 months ago

Hey, as of right now, this implementation does not support models with dynamic width and heights, only dynamic batch: image

Lishumuzixin commented 8 months ago

Hey, as of right now, this implementation does not support models with dynamic width and heights, only dynamic batch: image

If only dynamic batch size is needed, then how to set the yolov8 export ? I use the following code to export, but, height and width are also dynamic. model = YOLO("../runs/segment/train70/weights/best.pt") model.fuse() model.info(verbose=False) model.export(format="onnx",opset=12,dynamic=True)

lizexu123 commented 8 months ago

I borrowed your code and used it in the paddle framework, but it has not been successful yet. Can you help me take a look?

cyrusbehr commented 7 months ago

Hi @Lishumuzixin Please look at v4.1. I have added support for fixed batch size > 1.