Display text near tracking ID over bounding box

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) I want to display some text over bounding box… How can I do that ?
I am using yolo V3 for object detection along with tracker. Once the detection happened, I can see the tracker ID along with the bounding box like car 213 etc. Now I want to display some text near the tracker ID. How can I do that ?

Hi @shaw.hari , you can refer the source code demo



NvOSD_TextParams *txt_params

Hi@yuweiw, thanks for the reply. The solution you provided, this is for display in the screen however I want to display the text just on top of the bounding box where tracking ID is mentioned.


Like this, in the image I have marked it in green box… Inside the green box, I want some text.

You can change the x_offset and y_offset of the NvOSD_TextParams structure. But you should calculate the coordinate by yourself.

by changing the x_offset and y_offset of the NvOSD_TextParams, the below display line gets new location py_nvosd_text_params.display_text = “Frame Number={} Number of Objects={} Vehicle_count={} Person_count={}”.format(frame_number, num_rects, obj_counter[PGIE_CLASS_ID_VEHICLE], obj_counter[PGIE_CLASS_ID_PERSON])

But my problem was displaying a text just above the bounding box for every object which model will detect like the one in the image (car).

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.

I know what you mean. If you want draw something by yourself, you should calculate the coordinate first. You want to draw something on the bbox. You can get the bbox coordinate first. You can refer the source code below to get the bbox coordinate and then calculate the coordinate by youself.



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.