Nvinfer input formats

Description

I am currently using the nvinfer plugin to perform classification for an image. Ran into a weird error regarding the input format.

model-colour-formats=0 (RGB)

0:00:04.980314545 20682     0x35f94b90 ERROR                nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger:<dr> NvDsInferContext[UID 418]: Error in NvDsInferContextImpl::preparePreprocess() <nvdsinfer_context_impl.cpp:875> [UID = 418]: RGB/BGR input format specified but network input channels is not 3

Changing it to model-colour-formats=2 (GRAY)

0:00:05.401674841 21336      0x684f190 ERROR                nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger:<dr> NvDsInferContext[UID 418]: Error in NvDsInferContextImpl::preparePreprocess() <nvdsinfer_context_impl.cpp:884> [UID = 418]: GRAY input format specified but network input channels is not 1.

The model input is as follows:

Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_1 (InputLayer)            [(None, 299, 299, 3) 0                                            
__________________________________________________________________________________________________

Environment

TensorRT Version: 7.1.3.0
Jetpack Version: 4.5
CUDA Version: 10.2.89
CUDNN Version: 8.0.0.180

Hi,
This looks like a Jetson issue. We recommend you to raise it to the respective platform from the below link

Thanks!

Noted, raised it in Jetson forum instead. Thanks!