How to put the text to the frame/image on deepstream python?

Hi All,

So i am trying to input some text to the frame/image on deepstream python with the edited example “”, but i don’t know how to put it.
I search it and i found nearly solution, but still doesn’t get it.

Previously, on OpenCV there is a command to put the text as below.

cv2.putText(image,"Hello World!!!", (x,y), cv2.CV_FONT_HERSHEY_SIMPLEX, 2, 255)

But, in deepstream python i don’t know where frame or the image show as OpenCV, how about deepstream?
in OpenCV use the code:

cv2.imshow('Name of the tab', frame)

Thank you.

You can change here, tiler_src_pad_buffer_probe in

what you want is OSD (Onscreen Display), DeepStream OSD supports to draw shaded boxes, rectangles and text on the composited frame.

As Amy mentioned, you can refer to below code piece in tiler_src_pad_buffer_probe to add OSD.

        display_meta.num_labels = 1
        py_nvosd_text_params = display_meta.text_params[0]
        py_nvosd_text_params.display_text = "Frame Number={} Number of Objects={} Vehicle_count={} Person_count={}".format(frame_number, num_rect\
s, vehicle_count, person)
        py_nvosd_text_params.x_offset = 10;
        py_nvosd_text_params.y_offset = 12;
        py_nvosd_text_params.font_params.font_name = "Serif"
        py_nvosd_text_params.font_params.font_size = 10 = 1.0 = 1.0 = 1.0
        py_nvosd_text_params.font_params.font_color.alpha = 1.0
        py_nvosd_text_params.set_bg_clr = 1 = 0.0 = 0.0 = 0.0
        py_nvosd_text_params.text_bg_clr.alpha = 1.0
        #print("Frame Number=", frame_number, "Number of Objects=",num_rects,"Vehicle_count=",vehicle_count,"Person_count=",person)
        pyds.nvds_add_display_meta_to_frame(frame_meta, display_meta)"""
        print("Frame Number=", frame_number, "Number of Objects=",num_rects,"Vehicle_count=",obj_counter[PGIE_CLASS_ID_VEHICLE],"Person_count=",o\

I have tried the code, but it got error, or maybe i write the code wrongly ?

we have provided our reference code -
if you need further help, could you provide your code with which we reproduce your issue?