marcoslucianops / DeepStream-Yolo-Seg

NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 implementation for YOLO-Segmentation models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't build the model engine file for batch size > 2

cgrtrifork opened this issue · comments

I exported a YOLOv8-Seg into an ONNX model using the utils from this repo, setting --dynamic option when exporting. I also tried manually specifying the --batch option, but the results were the same:

I have 4 streams from different cameras, and I set batch-size=4 on the model configuration.

However, when running the DeepStream pipeline this is the error I'm seeing. The problem persists with batch-size=3 or batch-size=5.

ERROR: [TRT]: 4: [shapeCompiler.cpp::evaluateShapeChecks::1180] Error Code 4: Internal Error (kOPT values for profile 0 violate shape constraints: IShuffleLayer /1/Reshape_12: reshaping failed for tensor: /1/Expand_1_output_0 Reshape would change volume.)
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:1124 Build engine failed from config file
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:816 failed to build trt engine.

I'm wondering if this is internal to the YOLOv8-Seg model, or this is happening due to the export from the utils in this repo. What are the different steps from this repo and the export command from ultralytics?