I only added a print to each probe in the sample you suggested: deepstream-infer-tensor-meta-test
Everything else is the exact same, configs etc.The prints never show a batch dimension, which should be the dim[0].This dim, per configuration, should be 1 for pgie and 16 for sgie but following is output for first 4 dims:
PGIE Frame Number: 112
-------------
PGIE InferLayer 0 Info: output_cov/Sigmoid:0
dims: [4, 34, 60, 0]
-------------
PGIE InferLayer 1 Info: output_bbox/BiasAdd:0
dims: [16, 34, 60, 0]
Frame Number = 107 Number of objects = 15 Vehicle Count = 11 Person Count = 4
SGIE Frame Number: 110
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [6, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [20, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [6, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [20, 0, 0, 0]
PGIE Frame Number: 113
-------------
PGIE InferLayer 0 Info: output_cov/Sigmoid:0
dims: [4, 34, 60, 0]
-------------
PGIE InferLayer 1 Info: output_bbox/BiasAdd:0
dims: [16, 34, 60, 0]
SGIE Frame Number: 111
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [6, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [20, 0, 0, 0]
Frame Number = 108 Number of objects = 12 Vehicle Count = 8 Person Count = 4
PGIE Frame Number: 114
-------------
PGIE InferLayer 0 Info: output_cov/Sigmoid:0
dims: [4, 34, 60, 0]
-------------
PGIE InferLayer 1 Info: output_bbox/BiasAdd:0
dims: [16, 34, 60, 0]
SGIE Frame Number: 112
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [6, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [20, 0, 0, 0]
Frame Number = 109 Number of objects = 11 Vehicle Count = 7 Person Count = 4
PGIE Frame Number: 115
-------------
PGIE InferLayer 0 Info: output_cov/Sigmoid:0
dims: [4, 34, 60, 0]
-------------
PGIE InferLayer 1 Info: output_bbox/BiasAdd:0
dims: [16, 34, 60, 0]
SGIE Frame Number: 113
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [6, 0, 0, 0]
-------------
SGIE InferLayer 0 Info: predictions/Softmax:0
dims: [20, 0, 0, 0]
Frame Number = 110 Number of objects = 10 Vehicle Count = 6 Person Count = 4
For SGIE the 6 and 20 are just the number of classes not the dynamic batch, so i have to iterate through all units inside batch_meta, be it rois, objects or frames, ech iteration contains result for a SINGLE batch unit but i want the WHOLE tensor so there should be dims: [16, 20, 0, 0] in output.
I looked at the Sigmoid output layer of the vehicle make models onnx file and it also show the dim being: name:
predictions/Softmax:0
tensor: float32[unk__94,20]
with unk__94 being th batch_dim i am desperately looking for, looks like meta utils or whatever is removing the dim at position 0 and “splitting” each batch unit into its own NvDsInferTensorMetas data buffer
this is output on startup for the vehicle make etc. models used by sample:
root@flowx16:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-infer-tensor-meta-test# /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-infer-tensor-meta-test/deepstream-infer-tensor-meta-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
With tracker
max_fps_dur 8.33333e+06 min_fps_dur 2e+08
Now playing...
Failed to query video capabilities: Invalid argument
0:00:00.144840677 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<secondary2-nvinference-engine> NvDsInferContext[UID 3]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 3]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.1/samples/models/Secondary_VehicleTypes/resnet18_vehicletypenet_pruned.onnx_b16_gpu0_int8.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:327 [FullDims Engine Info]: layers num: 2
0 INPUT kFLOAT input_1:0 3x224x224 min: 1x3x224x224 opt: 16x3x224x224 Max: 16x3x224x224
1 OUTPUT kFLOAT predictions/Softmax:0 6 min: 0 opt: 0 Max: 0
0:00:00.144876361 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<secondary2-nvinference-engine> NvDsInferContext[UID 3]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 3]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.1/samples/models/Secondary_VehicleTypes/resnet18_vehicletypenet_pruned.onnx_b16_gpu0_int8.engine
0:00:00.149713450 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<secondary2-nvinference-engine> [UID 3]: Load new model:dstensor_sgie2_config.txt sucessfully
0:00:00.154977079 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<secondary1-nvinference-engine> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 2]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.1/samples/models/Secondary_VehicleMake/resnet18_vehiclemakenet_pruned.onnx_b16_gpu0_int8.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:327 [FullDims Engine Info]: layers num: 2
0 INPUT kFLOAT input_1:0 3x224x224 min: 1x3x224x224 opt: 16x3x224x224 Max: 16x3x224x224
1 OUTPUT kFLOAT predictions/Softmax:0 20 min: 0 opt: 0 Max: 0
0:00:00.155002228 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<secondary1-nvinference-engine> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 2]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.1/samples/models/Secondary_VehicleMake/resnet18_vehiclemakenet_pruned.onnx_b16_gpu0_int8.engine
0:00:00.155510811 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<secondary1-nvinference-engine> [UID 2]: Load new model:dstensor_sgie1_config.txt sucessfully
0:00:00.160862850 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.1/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
Implicit layer support has been deprecated
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:327 [Implicit Engine Info]: layers num: 0
0:00:00.160883614 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.1/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
0:00:00.164382456 470186 0x59c5dc3f37a0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary-nvinference-engine> [UID 1]: Load new model:dstensor_pgie_config.txt sucessfully
Running...
max_fps_dur 8.33333e+06 min_fps_dur 2e+08