Please provide complete information as applicable to your setup.
• Hardware Platform GPU A6000 ADA
• DeepStream Version 8.0
• NVIDIA GPU Driver Version 13.0
Hi ,
I’ve been banging my head against this for a few days now and hoping someone can help point me in the right direction.
I’m trying to set up an embedding model (ResNet50 headless) as a secondary GIE in DeepStream 8.0, with a custom nvdspreprocess library that applies segmentation masks to detected objects before running the embedding inference. The idea is to mask out the background and only pass the segmented object to the embedding model .
The problem is that when I enable input-tensor-meta=1 on the nvinfer element, it completely skips inference - no errors, no warnings, just silently produces nothing. Without input-tensor-meta set, the model runs fine and I get output tensors.
Here’s what I’ve verified so far:
- The tensor IS being created and passed correctly - I can see GstNvDsPreProcessBatchMeta in the batch_user_meta_list when I probe the nvinfer sink pad
- target_unique_ids matches my gie-unique-id (both are 7)
- tensor_meta has a valid buffer pointer
- My custom tensor prep function is working - I’m dumping the tensor to a PPM file and it looks correct
- Both input-tensor-meta and output-tensor-meta are set to 1 (verified with g_object_get)
But on the source pad of nvinfer, there’s zero NVDSINFER_TENSOR_OUTPUT_META. It’s like nvinfer just ignores the tensor entirely.
My configs:
nvinfer config:
[property]
gpu-id=0
gie-unique-id=7
onnx-file=embedding_model/resnet50_headless.onnx
model-engine-file=embedding_model/resnet50_headless.onnx_b8_gpu0_fp32.engine
batch-size=8
net-scale-factor=1.0
offsets=123.675;116.28;103.53
infer-dims=3;224;224
network-type=100
output-tensor-meta=1
input-tensor-meta=1
operate-on-gie-id=1
process-mode=2
operate-on-class-ids=0
network-mode=2
nvdspreprocess config:
[property]
enable=1
target-unique-ids=7
unique-id=8
network-input-order=0
process-on-frame=0
operate-on-gie-id=1
maintain-aspect-ratio=1
symmetric-padding=1
processing-width=224
processing-height=224
network-input-shape=8;3;224;224
scaling-buf-pool-size=6
tensor-buf-pool-size=6
network-color-format=0
tensor-data-type=0
tensor-name=input
scaling-pool-memory-type=1
scaling-pool-compute-hw=0
scaling-filter=0
custom-lib-path=/opt/nvidia/deepstream/deepstream-8.0/kafka-cpp/gst-nvdspreprocess/nvdspreprocess_lib/libcustom2d_preprocess.so
custom-tensor-preparation-function=CustomTensorPreparation
[user-configs]
pixel-normalization-factor=1.0
offsets=123.675;116.28;103.53
Sink pad probe shows:
=== NVINFER SINK PAD PROBE ===
num_frames_in_batch: 2
✓ GstNvDsPreProcessBatchMeta FOUND!
target_unique_ids count: 1
target_unique_id[0]: 7
✓ tensor_meta EXISTS!
tensor_meta->meta_id: 0
tensor_meta->gpu_id: 0
tensor_meta->raw_tensor_buffer: 0x7c5017200000
roi_vector size: 1
Source pad probe shows:
=== NVINFER SOURCE PAD PROBE ===
num_frames_in_batch: 2
Batch User meta type: 28 (NVDS_PREPROCESS_BATCH_META - carried over)
Batch User meta type: 28
...
*** NO NVDSINFER_TENSOR_OUTPUT_META! ***
I did notice one thing - the docs say “ensure that the batch-size of nvinfer is equal to the sum of ROIs”. My batch-size is 8 but roi_vector size varies depending on how many objects are detected. Could this be the issue? If so, how do you handle variable object counts in SGIE mode with nvdspreprocess?
I tried setting batch-size=1 but then I get a different issue - and I’d need to regenerate the ONNX with dynamic batch support anyway.
Has anyone successfully used nvdspreprocess with input-tensor-meta for a secondary GIE? Any pointers would be really appreciated.
Running on dGPU with DeepStream 8.0.
Thanks!