Nvmsgconv wrong payload when operating at 2560x1440

Please provide complete information as applicable to your setup.

**• GPU
**• 6.2/7.0
• NVIDIA GPU Driver Version (valid for GPU only)
**• issue with payload
**• run 12 stream with yolov8 at res 2560x1440

I am running deepstream-test5-app with dsexample and nvmsgconv, everywhere the resolution is 2560x1440 ,in osd the bbox seems fine, but in payload bbox often rescale to half or 1/4 value

1 Like

How did you know “in payload bbox often rescale to half or 1/4 value” ? Thanks!

these are the recorded kfka msgs , u can see difference in first and second msgs, one is correct , second is wrong, tracking id is same for both , and the object is also stable, in osd bbox seems correct
{“cam_114”:{“bboxes”:[[380.4150390625,445.3477783203125,2391.72900390625,886.8936767578125],[67.212646484375,341.393798828125,2433.64990234375,1026.2470703125]],“frame_id”:8768,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9470614194869995,0.9617335796356201],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}
{“cam_114”:{“bboxes”:[[95.2015380859375,628.4540405273438,597.97900390625,775.577392578125],[16.82275390625,593.7970581054688,608.3958740234375,822.1029052734375]],“frame_id”:8769,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9469937086105347,0.961727499961853],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}

{“cam_114”:{“bboxes”:[[380.848388671875,445.3662109375,2391.592529296875,886.6680908203125],[67.427734375,341.3804931640625,2433.49267578125,1026.31640625]],“frame_id”:8770,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9470758438110352,0.9617863893508911],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}
{“cam_114”:{“bboxes”:[[95.11431884765625,628.456298828125,597.8086547851563,775.5789794921875],[16.7486572265625,593.7930908203125,608.407958984375,822.1138305664063]],“frame_id”:8771,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9471304416656494,0.961866557598114],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}
{“cam_114”:{“bboxes”:[[380.57861328125,445.40985107421875,2391.60595703125,886.6889038085938],[66.83984375,341.39892578125,2433.5517578125,1026.3857421875]],“frame_id”:8772,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9471102952957153,0.9617744088172913],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}
{“cam_114”:{“bboxes”:[[95.133544921875,628.4473876953125,597.87353515625,775.5760498046875],[16.79254150390625,593.7850952148438,608.3714599609375,822.1475219726563]],“frame_id”:8773,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9470763802528381,0.9618194103240967],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}4:01"}}
{“cam_114”:{“bboxes”:[[380.213134765625,445.37103271484375,2391.65673828125,886.7249145507813],[67.239990234375,341.329345703125,2433.479736328125,1026.27587890625]],“frame_id”:8774,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9471225142478943,0.9619323015213013],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:01”}}
{“cam_114”:{“bboxes”:[[379.739501953125,445.4576416015625,2391.40869140625,887.0255126953125],[67.463134765625,341.413330078125,2433.62255859375,1026.282958984375]],“frame_id”:8775,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9471420049667358,0.9619743227958679],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:02”}}
{“cam_114”:{“bboxes”:[[378.786376953125,445.475341796875,2391.206298828125,886.869873046875],[67.470947265625,341.3929443359375,2433.523193359375,1026.2371826171875]],“frame_id”:8776,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9472789764404297,0.9620538353919983],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:02”}}
{“cam_114”:{“bboxes”:[[379.421630859375,445.5972900390625,2391.0478515625,886.79150390625],[67.71435546875,341.4124755859375,2433.24755859375,1026.1490478515625]],“frame_id”:8777,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9472541809082031,0.9620415568351746],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:02”}}
{“cam_114”:{“bboxes”:[[94.79315185546875,628.5443115234375,597.7023315429688,775.625732421875],[16.91815185546875,593.8065795898438,608.3350219726563,822.0546875]],“frame_id”:8778,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9472928047180176,0.9620603322982788],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:02”}}
{“cam_114”:{“bboxes”:[[94.86724853515625,628.5439453125,597.441650390625,775.685791015625],[16.87603759765625,593.8041381835938,608.3340454101563,822.0264892578125]],“frame_id”:8779,“license_plate”:,“object_classes”:[“cover”,“truck”],“object_confidences”:[0.9472719430923462,0.9620245695114136],“object_ids”:[445,443],“plate_image”:0,“take_image”:0,“timestamp”:“2025-01-27 13:14:02”}}

do you mean object_ids is half of 2560x1440? Since I can’t find object_ids/object_confidences in DS code? how did you get the object_ids data? what is the actual size of bbox?

380.4150390625,445.3477783203125,2391.72900390625,886.8936767578125-first payload
95.2015380859375,628.4540405273438,597.97900390625,775.577392578125-second payload
FYI- > 95.2x4 =~380 and 597x4=~2391 , hence one-forth

first one is actual bbox, object-ids are tracking-ids, I am using custom dsmeta_payloal

could you share the configuration file of deepstream-test5-app?
how did you get the values of bboxes? did you get it from obj_meta->rect_params? could you share the related code?

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!
did you enable tiler plugin? how did you set width/height for tiler? AKY, tiler will change the resolution if setting a different w/h. you can disable tiler or set the same w/h to verify.

config file->

application:
enable-perf-measurement: 1
perf-measurement-interval-sec: 5
#gie-kitti-output-dir: streamscl

tiled-display:
enable: 1
rows: 3
columns: 4
width: 2560
height: 1440
gpu-id: 0
nvbuf-memory-type: 0

source:
csv-file-path: /home/configs/sources.csv

sink0:
enable: 1
#Type - 1=FakeSink 2=EglSink 3=File
type: 2
sync: 0
source-id: 0
gpu-id: 0
nvbuf-memory-type: 0

sink1:
enable: 1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvdrmvideosink 6=MsgConvBroker
type: 6
msg-conv-config: dstest5_msgconv_sample_config.yml
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM - Custom schema payload
msg-conv-payload-type: 1
#(0): Create payload using NvdsEventMsgMeta
#(1): New Api to create payload using NvDsFrameMeta
msg-conv-msg2p-new-api: 1
#Frame interval at which payload is generated
msg-conv-frame-interval: 1
msg-broker-proto-lib: /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str: localhost;9092;quickstart-events
topic: quickstart-events
#Optional:
#msg-broker-config: /opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor/cfg_kafka.txt
#new-api: 0
#(0) Use message adapter library api’s
#(1) Use new msgbroker library api’s

sink2:
enable: 0
type: 3
#1=mp4 2=mkv
container: 1
#1=h264 2=h265 3=mpeg4

only SW mpeg4 is supported right now.

codec: 3
sync: 1
bitrate: 2000000
output-file: out.mp4
source-id: 0

sink type = 6 by default creates msg converter + broker.

To use multiple brokers use this group for converter and use

sink type = 6 with disable-msgconv : 1

message-converter:
enable: 0
msg-conv-config: dstest5_msgconv_sample_config.yml
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM - Custom schema payload
msg-conv-payload-type: 0

Name of library having custom implementation.

#msg-conv-msg2p-lib:

Id of component in case only selected message to parse.

#msg-conv-comp-id:

Configure this group to enable cloud message consumer.

message-consumer0:
enable: 0
proto-lib: /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so
conn-str: ;
config-file: /opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor/cfg_kafka.txt
subscribe-topic-list: ;;

Use this option if message has sensor name as id instead of index (0,1,2 etc.).

#sensor-list-file: dstest5_msgconv_sample_config.txt

osd:
enable: 1 #change here
gpu-id: 0
border-width: 1
text-size: 15
text-color: 1;1;1;1
text-bg-color: 0.3;0.3;0.3;1
font: Arial
show-clock: 0
clock-x-offset: 800
clock-y-offset: 820
clock-text-size: 12
clock-color: 1;0;0;0
nvbuf-memory-type: 0

streammux:
gpu-id: 0
##Boolean property to inform muxer that sources are live
live-source: 1
batch-size: 12 #change to n_streams
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout: 40000

Set muxer output width and height

width: 2560
height: 1440
#enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding: 0
nvbuf-memory-type: 0

If set to TRUE, system timestamp will be attached as ntp timestamp

If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached

attach-sys-ts-as-ntp: 1

ds-example:
enable: 1 #here
processing-width: 2560
processing-height: 1440
full-frame: 1
unique-id: 30
gpu-id: 0
blur-objects: 0

Supported memory types for blur-objects are 1 and 3

nvbuf-memory-type: 0

config-file property is mandatory for any gie section.

Other properties are optional and if set will override the properties set in

the infer config file.

primary-gie:
enable: 1
gpu-id: 0
#Required to display the PGIE labels, should be added even when using config-file
#property
batch-size: 12 #n_streams
#Required by the app for OSD, not a plugin property
bbox-border-color0: 1;0;0;1
bbox-border-color1: 0;1;1;1
bbox-border-color2: 0;0;1;1
bbox-border-color3: 0;1;0;1
interval: 0
plugin-type: 0
#Required by the app for SGIE, when used along with config-file property
gie-unique-id: 1
nvbuf-memory-type: 0
model-engine-file: /home/model_b12_gpu0_fp32.engine
#labelfile-path: /home/DeepStream-Yolo/labels_sentics.txt
config-file: /home/configs/config_infer_primary_yolov5.txt
#infer-raw-output-dir: …/…/…/…/…/samples/primary_detector_raw_output/

tracker:
enable: 1

For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively

tracker-width: 960
tracker-height: 544
ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so

ll-config-file required to set different tracker types

ll-config-file: …/…/…/…/…/samples/configs/deepstream-app/config_tracker_IOU.yml

ll-config-file: …/…/…/…/…/samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml

ll-config-file: …/…/…/…/…/samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml

ll-config-file: …/…/…/…/…/samples/configs/deepstream-app/config_tracker_DeepSORT.yml

gpu-id: 0
enable-batch-process: 1
enable-past-frame: 1
display-tracking-id: 1

secondary-gie0:
enable: 0
gpu-id: 0
gie-unique-id: 4
operate-on-gie-id: 1

operate-on-class-ids: 0

batch-size: 17
config-file: /home/configs/config_infer_secondary_yolov5.txt
labelfile-path: /home/configs/labels_vest.txt
model-engine-file: /home/model_b17_gpu0_fp32.engine

secondary-gie1:
enable: 0
gpu-id: 0
gie-unique-id: 5
operate-on-gie-id: 1
operate-on-class-ids: 5
batch-size: 1
config-file: /home/configs/lpr_config_sgie_us.yml
#labelfile-path: /home/configs/dict_us.txt
#model-engine-file: …/…/…/…/…/samples/models/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine

secondary-gie2:
enable: 1
gpu-id: 0
gie-unique-id: 6
operate-on-gie-id: 1
operate-on-class-ids: 5
batch-size: 12
config-file: /home/configs/lpr_config_sgie_us.yml
#labelfile-path: …/…/…/…/…/samples/models/Secondary_CarMake/labels.txt
#model-engine-file: /home/configs/model_weights/_lprnet_v2.10_13_12_24_licence_plate_epoch-365.onnx_b12_gpu0_fp32.engine

tests:
file-loop: 0

resolution is same everywhere, can we set resolution for nvmsgconv?

Here is my test. I did not reproduce your issue. is the rect in first payload same with obj_meta->rect_params? how did you get the rect in second payload? test5 is opensouce. could you add log to narrow down this issue? or please provide a simplified code to reproduce this issue. Thanks!

  1. I only added the following code in bbox_generated_probe_after_analytics of test5. then rebuild test5.
printf("in bg,fid:%d, id:%ld, l %f,t %f,w %f,h %f\n", frame_meta->frame_num, obj_meta->object_id,
        obj_meta->rect_params.left, obj_meta->rect_params.top, obj_meta->rect_params.width, obj_meta->rect_params.height);
  1. added the similar log to print the objects rect in nvmsgconv plugin. then rebuld and replace libnvdsgst_msgconv.so.
  2. test5_config_file_src_infer_kakfa.yml (5.9 KB)
    after run ./deepstream-test5-app -c configs/test5_config_file_src_infer_kakfa.yml. the object rect did not change.
    in bg,fid:30, id:0, l 1772.520752,t 530.413513,w 22.228027,h 22.809132
    in plugin,fid:30, id:0, l 1772.520752,t 530.413513,w 22.228027,h 22.809132