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
• JetPack Version (valid for Jetson only)
• TensorRT Version

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(
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:

    # Casting to pyds.NvDsObjectMeta
    obj_meta = pyds.NvDsObjectMeta.cast(
except StopIteration:
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 = 0.0 = 0.0 = 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:

#I am using nvstreamdemux so the following is within a for loop

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