RGB/BGR input format specified but network input channels is not 3

I’m trying to deploy an image detection model on deepstream 5.0
and got this error:

0:00:18.713981613 25250 0x55d7df54af00 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::preparePreprocess() <nvdsinfer_context_impl.cpp:783> [UID = 1]: RGB/BGR input format specified but network input channels is not 3

input dimension for the model: 288, 288, 3

@nujjod

I think the last dimension of your input tensor is the channel dimension.

Which kind of model are you using? uff, tlt (tensorflow), caffe or pytorch?

You can update following parameters if you are using uff:

infer-dims=288;288;3
# 0: NCHW   1: NHWC   2: NC
uff-input-order=1

You’d better add a transpose layer into your model to transpose input from (3, 288, 288) into (288, 288, 3) before deploying the model onto DeepStream 5.0 if you are other models like tensorflow or pytorch