ERROR: [TRT]: Network has dynamic or shape inputs, but no optimization profile has been defined

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.0 GA
• JetPack Version (valid for Jetson only) 4.4
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

Hi, I am trying the redaction with deepstream (which was for DS4) but couldn’t run due to the error:

ERROR: [TRT]: Network has dynamic or shape inputs, but no optimization profile has been defined.
ERROR: [TRT]: Network validation failed.
ERROR: Build engine failed from config file
ERROR: failed to build trt engine.
0:00:08.000531650 12852   0x5565794c30 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
0:00:08.001538797 12852   0x5565794c30 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1697> [UID = 1]: build backend context failed
0:00:08.001657600 12852   0x5565794c30 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1024> [UID = 1]: generate backend failed, check config file settings
0:00:08.001745049 12852   0x5565794c30 WARN                 nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:08.001788539 12852   0x5565794c30 WARN                 nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Config file path:deepstream-app/pgie_config_fd_lpd.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
** ERROR: <constructorDeepStream:292>: Failed to set pipeline to PAUSED

My fd_lpd.caffemodel looks like this:

[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
model-file=fd_lpd_model/fd_lpd.caffemodel
proto-file=fd_lpd_model/fd_lpd.prototxt
#model-engine-file=fd_lpd_model/fd_lpd.caffemodel_b1_fp16.engine
labelfile-path=fd_lpd_model/labels.txt
net-stride=16
batch-size=1
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=2

num-detected-classes=4
interval=0
gie-unique-id=1
parse-func=4
output-blob-names=output_bbox;output_cov
#parse-bbox-func-name=NvDsInferParseCustomResnet
#custom-lib-path=/path/to/libnvdsparsebbox.so
#enable-dbscan=1

[class-attrs-all]
threshold=0.2
group-threshold=1
## Set eps=0.7 and minBoxes for enable-dbscan=1
eps=0.2
#minBoxes=3
roi-top-offset=0
roi-bottom-offset=0
detected-min-w=0
detected-min-h=0
detected-max-w=1920
detected-max-h=1920

# Per class configuration
# ONLY INTERESTED IN CLASS 0 (Face) AND CLASS 1 (License Plate)
# CHANGE THRESH OF CLASS 1 AND CLASS 2 TO > 1 TO REJECT THE DETCTION
[class-attrs-2]
threshold=1.2
eps=0.5
group-threshold=3
roi-top-offset=20
roi-bottom-offset=10
detected-min-w=40
detected-min-h=40
detected-max-w=400
detected-max-h=800

# Per class configuration
[class-attrs-3]
threshold=1.2
eps=0.5
group-threshold=3
roi-top-offset=20
roi-bottom-offset=10
detected-min-w=40
detected-min-h=40
detected-max-w=400
detected-max-h=800

parser-bbox-norm=35.0;35.0

Please help me resolve the issue. Thanks.

@neuroSparK

This topic is duplicated.
Continue to follow this one: Network has dynamic or shape inputs, but no optimization profile has been defined