Deepstream 6.2 Symbol "\n" is not recognised

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson Xavier
• DeepStream Version: 6.2
• JetPack Version (valid for Jetson only): 5.1.1

I have an application which uses deepstream to do some analytics and then show the result through text on video using “display_text”. My code works fine for DS <= 6.1, but it does not work with DS 6.2. The main problem is that it does not recognise the symbol “\n” and when the text is shown, everything is on the same line. I have tried different solutions such as multiple consecutive “\n” or triple quotes (“”“) instead of single (”). Nothing worked.
I was wondering if that is a DS6.2 bug or something about display_text has changed and was not reported.

Thank you in advance for helping.

This is the code (works on DS<=6.1, does not work on DS6.1):

py_nvosd_text_params = nvdsdata.display_meta.text_params[0]

py_nvosd_text_params.display_text = MY_TEXT

py_nvosd_text_params.x_offset = 50
py_nvosd_text_params.y_offset = 50

py_nvosd_text_params.font_params.font_name = “Arial”
py_nvosd_text_params.font_params.font_size = 24
py_nvosd_text_params.font_params.font_color.set(0.0, 1.0, 0.0, 1.0)

py_nvosd_text_params.set_bg_clr = 1
py_nvosd_text_params.text_bg_clr.set(0.25, 0.25, 0.25, 0.75)

nvdsdata.display_meta.num_labels += 1

for nvdsframemeta in nvdsdata.list_frame_meta:
nvdsframemeta.frame_meta, nvdsdata.display_meta

Could you try to set the process-mode parameter of nvdsosd plugin to 0 first?

Thank you, this worked!

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