How to add a new element to NvDsObjectMeta?

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 5.1
• Issue Type( questions, new requirements, bugs): questions.

Hi everyone, I’m just a newbie to deepstream.

I ran the deepstream-ssd-parser with KLT tracker of deepstream-nvanalytics. According to my knowledge, the NvDsObjectMeta includes class_id, objec_id, bounding_box,… Can I add a new element to NvDsObjectMeta?. Specifically, I wanna add midpoint of object in order to display it with nvosd.

Could you guys give me some comments or advice about that? Thanks in advanced.

If you just want to display the midpoint, you can refer deepstream-test1 for how to add display meta

Thanks, I’ll notice that. Btw, how to add the midpoint to the NvDsObjectMeta? Because I need it for post-processing as well.

I didn’t get, you can calculate the mid point if already get the bbox

Yeah exactly. My question now is how to change or custom the NvDsObjectMeta in python ? Is it possible ? I also wanna draw a circle at the midpoint, how can I do it ?

Osd is used to do the real draw work, so you just add the display meta for circle and osd will help you do that, refer Deepstream Python API Reference — Deepstream Deepstream Version: 6.1.1 documentation

Hi, I followed your instruction and it didn’t work. Here is my code:

rect_para = obj_meta.rect_params
circle_meta = pyds.nvds_acquire_display_meta_from_pool(batch_meta)
circles = circle_meta.circle_params
circle = circles[0]
circle.has_bg_color = 1
circle.bg_color.set(1.0, 1.0, 0.0, 1.0)
circle.radius = 5
circle.xc = int(rect_para.left + int(rect_para.width / 2))
circle.yc = int(rect_para.top + int(rect_para.height / 2))
circle.circle_color.set(1.0, 1.0, 0.0, 1.0)
pyds.nvds_add_display_meta_to_frame(frame_meta, display_meta)

Could you give me some advise or comments about what’s wrong here ? Thank you very much.

Can you refer deepstream_tao_apps/apps/tlt_others/deepstream-bodypose2d-app at release/tlt3.0 · NVIDIA-AI-IOT/deepstream_tao_apps · GitHub