DeepStream-Yolo icon indicating copy to clipboard operation
DeepStream-Yolo copied to clipboard

Error when running Deepstream and Tensorrt 10.x

Open OnceUponATimeMathley opened this issue 6 months ago • 2 comments

I want to update to tensorrt 10.x to make it support not auto case INT64 -> INT32 Screenshot 2024-08-25 at 15 06 24

But when upgrade to tensorrt 10.x, ONNX can not auto convert to engine Screenshot 2024-08-26 at 14 17 05

I try export engine from onnx by trtexec in same env I build for running deepstream: /usr/src/tensorrt/bin/trtexec --onnx=yolov8_warehouse_7_class.onnx --saveEngine=yolov8_warehouse_7_class.engine

But it error occurred ERROR: [TRT]: 4: [runtime.cpp::deserializeCudaEngineEx::113] Error Code 4: Internal Error (Cannot deserialize engine with lean runtime since IRuntime::getEngineHostCodeAllowed() is false.) ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:1533 Deserialize engine failed from file: /ds_app/models/infer/engine/yolov8_warehouse_7_class.engine ERROR: [TRT]: ModelImporter.cpp:949: While parsing node number 0 [Conv -> "/0/model.0/conv/Conv_output_0"]: ERROR: [TRT]: ModelImporter.cpp:950: --- Begin node --- input: "input" input: "0.model.0.conv.weight" input: "0.model.0.conv.bias" output: "/0/model.0/conv/Conv_output_0" name: "/0/model.0/conv/Conv" op_type: "Conv" attribute { name: "dilations" ints: 1 ints: 1 type: INTS } attribute { name: "group" i: 1 type: INT } attribute { name: "kernel_shape" ints: 3 ints: 3 type: INTS } attribute { name: "pads" ints: 1 ints: 1 ints: 1 ints: 1 type: INTS } attribute { name: "strides" ints: 2 ints: 2 type: INTS }

ERROR: [TRT]: ModelImporter.cpp:951: --- End node --- ERROR: [TRT]: ModelImporter.cpp:954: ERROR: onnxOpImporters.cpp:775 In function importConv: [8] Assertion failed: (nbSpatialDims == kernelWeights.shape.nbDims - 2): The number of spatial dimensions and the kernel shape doesn't match up for the Conv operator. Number of spatial dimensions = 5, number of kernel dimensions = 4.

Could not parse the ONNX model

OnceUponATimeMathley avatar Aug 26 '24 17:08 OnceUponATimeMathley