Acquire obj_meta.text_params.display_text and change it in pyds

• Hardware Platform GPU
• DeepStream Version 5
• TensorRT Version 7.0
• NVIDIA GPU Driver Version 460
• Issue Type question

I want to acquire obj_meta.text_params.display_text and append it with classifier information. However I got its C address.

my code :

display_meta=pyds.nvds_acquire_display_meta_from_pool(batch_meta)
display_meta.num_labels = 1
py_nvosd_text_params = display_meta.text_params[0]
py_nvosd_text_params.x_offset = 10
py_nvosd_text_params.y_offset = 12
py_nvosd_text_params.font_params.font_size = 20
py_nvosd_text_params.display_text = “your text”
py_nvosd_text_params.font_params.font_color.set(1.0, 0.0, 0.0,1)
py_nvosd_text_params.font_params.font_size = 50
py_nvosd_rect_params.border_color.set(1.0, 0.0, 0.0,1)
pyds.nvds_add_display_meta_to_frame(frame_meta, display_meta)

you can try it :)

You can only add classified information to display_mata in this way, but you can not associate with the specified obj_meta.
The function I want to implement is to attach the classification information to the corresponding obj, just like the sgie in ‘apps/sample_apps/deepstream-infer-tensor-meta-app’, but I don’t know how to use pyds.

I get your question!
emmm,try this code :

obj_meta.text_params.display_text = "people"
print(pyds.get_string(obj_meta.text_params.display_text))

you can try it :)

source:Python Sample Apps Source Details — DeepStream DeepStream Version: 5.0 documentation

Thank you for your guidance. According to your method, I have successfully solved the problem