• 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.
gharbv
February 3, 2021, 6:27am
3
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 :)
gharbv:
display_meta
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.
gharbv
February 5, 2021, 3:40am
6
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 and Bindings Source Details — DeepStream 6.1.1 Release documentation
1 Like
Thank you for your guidance. According to your method, I have successfully solved the problem