Cannot use channel_offsets in preprocess in streamer/config/sgie_config.txt

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Deepstream 6.2

which sample are you testing? what is the whole media pipeline?
which plugin are you using to do preprocess?

plugin: nvinferserver

it throw an error when setting channel_ offsets in preprocess part od the config file:
preprocess {
network_format: IMAGE_FORMAT_BGR
maintain_aspect_ratio: 1
frame_scaling_hw: FRAME_SCALING_HW_DEFAULT
frame_scaling_filter: 1
symmetric_padding: 1
normalize {
scale_factor: 1.0
channel_offsets: [77.5, 21.2, 11.8] <----ERROR

(when I add the line “channel_offsets: [77.5, 21.2, 11.8]” it throw the error:

INFO: infer_grpc_backend.cpp:169 TritonGrpcBackend id:2 initialized for model: resnet
ERROR: infer_cuda_context.cpp:238 failed to set preprocess scalor and offsets.
0:00:00.154625384 11463 0x55bbd1c93380 ERROR nvinferserver gstnvinferserver.cpp:407:gst_nvinfer_server_logger: nvinferserver[UID 2]: Error in initialize() <infer_base_context.cpp:89> [UID = 2]: Infer Context failed to create preprocessors., nvinfer error:NVDSINFER_CONFIG_FAILED
0:00:00.154639188 11463 0x55bbd1c93380 WARN nvinferserver gstnvinferserver_impl.cpp:588:start: error: Failed to initialize InferTrtIsContext
0:00:00.154642314 11463 0x55bbd1c93380 WARN nvinferserver gstnvinferserver_impl.cpp:588:start: error: Config file path: config/sgie_resnet50_config.txt
0:00:00.154810976 11463 0x55bbd1c93380 WARN nvinferserver gstnvinferserver.cpp:509:gst_nvinfer_server_start: error: gstnvinferserver_impl start failed

this error is from NetworkPreprocessor::setScaleOffsets, nvinferserver plugin is opensource, please find it in \opt\nvidia\deepstream\deepstream-6.2\sources\libs\nvdsinferserver\infer_cuda_context.cpp.

  1. is the model 's input channel number three?
  2. can you use deepstream sample objectDetector_FasterRCNN to reproduce this issue? noticing there are similar settings in the configuration file \opt\nvidia\deepstream\deepstream-6.2\sources\objectDetector_FasterRCNN\config_triton_inferserver_primary_fasterRCNN_custom.txt.

Thanks fanzh,

It’s working now.
I add to change tensor_order from TENSOR_ORDER_LINEAR to TENSOR_ORDER_NHWC which is the same order as the model Inputs.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.