NVDSAlalytics - change line coordinates on the fly

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson
• 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Using the following pipeline: streammux ! pgie ! nvtracker ! sgie ! nvdsanalytics ! tiler ! nvvidconv ! nvosd ! transform ! hlssink, the coordinates of the lines or ROI zones is set in the config_nvdsanalytics.txt. So the coordinates are read in the deepstream_nvdsanalytics_test.cpp → /* Configure the nvdsanalytics element for using the particular analytics config file*/
g_object_set (G_OBJECT (nvdsanalytics),
“config-file”, “config_nvdsanalytics.txt”,

I want to be able to change the coordinates of the lines/ROI’ s “on the fly” without having to stop and start the pipeline. Is there a way in the main cpp code to override (some parts of) the configfile?

Hey, you need to modify the config file and do g_object_set to see if it can work?

Directly modifying the settings using g_object_set is not working as the plugin only takes “unique-id”, “enable” and “config-file” as properties.
Modify your config file and restart the pipeline seems to be the answer for now.

@bcao Is there a possibility to retrieve the coordinates from the NvDsBatchMeta and use it to draw a line on the screen (without the arrow) in a osd_sink_pad_buffer_probe ? This way the nvosd can be clean (using osd-mode=0).

Or maybe even modify the coordinates in a tiler_src_pad_buffer_probe ?

Yeah, I mean modify the config file and do g_object_set again.

I think you can do it in any osd upstream plugin’s probe.

1 Like