How to edit labels of detections? Can't get NvDsObjectMeta object to modify text_params,rect_params.bg_color, rect_params.border_width

• Hardware Platform (Jetson / GPU)
Jetson Orin
• DeepStream Version
6.1.1
• JetPack Version (valid for Jetson only)
5.0.2
• TensorRT Version
8.4.1-1+cuda11.4

Hello, in my Deepstream app I have 1 primary detector and 2 secondary detectors.
I am trying to hide or edit the labels of the detectors using:

obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
obj_meta.text_params.display_text = "TEST"
it is not changing the label of the detection.
Also, I have set up different colors for each detector bounding box:
The first detector is blue, second is green and the third one is red
It is not working all bounding boxes are red.
obj_meta.rect_params.bg_color is not working.

Also if I set all detectors with obj_meta.rect_params.border_width = 0 the bounding boxes still show.

How can I fix this?

The label of the object is in NvDsObjectMeta. NvDsObjectMeta — Deepstream Deepstream Version: 6.1.1 documentation

Please check text_params and obj_label.

@Fiona.Chen I am already using NvDsObjectMeta object…
Below my code:

try:
    # Casting l_obj.data to pyds.NvDsObjectMeta
    obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
except StopIteration:
    break
print(type(obj_meta))    # THE TYPE IS: <class 'pyds.NvDsObjectMeta'>
obj_meta.text_params.display_text = "TEST"
obj_meta.obj_label  = "TEST"
obj_meta.rect_params.border_width = 0
obj_meta.rect_params.has_bg_color = 1
obj_meta.rect_params.bg_color.red = 0.0
obj_meta.rect_params.bg_color.green = 0.0
obj_meta.rect_params.bg_color.blue = 1.0
obj_meta.rect_params.bg_color.alpha = 0.0

None of the obj_meta parameters work.
I have border_width = 0 the bboxes still show. All bboxes are color red and the labels are not changing.

Where did you change the text and color? Before nvdsosd or after nvdsosd?

Within def osd_sink_pad_buffer_probe.
This is my pipeline:

streammux.link(pgie)
pgie.link(tracker)
tracker.link(sgie1)
sgie1.link(sgie2)
sgie2.link(nvstreamdemux)

#I am using nvstreamdemux so the following is within a for loop
queue.link(nvvidconv1)
nvvidconv1.link(filter1)
filter1.link(nvvidconv)
nvvidconv.link(nvosd)
  
nvosd.link(tee)
queue1.link(msgconv)
msgconv.link(msgbroker)

queue2.link(nvvidconv_postosd)
nvvidconv_postosd.link(caps)
caps.link(encoder)
encoder.link(rtppay)
rtppay.link(sink)

@Fiona.Chen Also, I am unable to get the parent of NvDsObjectMeta object for my secondary detectors. Please help me. Thank you