Runtime Configuration Changes for Gst-nvdsanalytics Plugin Settings

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
6.3

• Issue Type( questions, new requirements, bugs)
I am facing the challenge of dynamically adjusting the settings of the Gst-nvdsanalytics plugin within my DeepStream pipeline. My setup involves cameras with different presets, each accessing different areas every 3 minutes, and consequently, the regions of interest (ROIs) change accordingly.

I have the camera responses for each change in preset, and what I need is to dynamically update the ROIs at runtime. The challenge I’m facing is to modify the ROIs within the Gst-nvdsanalytics plugin without the need to halt the entire pipeline. In my use case, the cameras switch presets, and I receive feedback from the cameras each time this happens. My goal is to adjust the ROIs dynamically to match the new preset, all while the pipeline remains uninterrupted.

For example, in a pipeline with four cameras, when the preset of the first camera changes, I want to dynamically modify the ROIs (Gst-nvdsanalytics) specific to that preset.

I’ve reviewed the documentation but couldn’t find a straightforward way to dynamically remove and add new ROIs during runtime. I am working with Python for my implementation and would greatly appreciate support in resolving this issue.

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. Thanks

Gst-nvdsanalytics is opensource in DS6.3. you need to modify parsing function nvdsanalytics_parse_yaml_roi_filtering_group to load the new ROIs, and you need to modify gst_nvdsanalytics_transform_ip to create a new NvDsAnalyticCtx.

1 Like

Here is sample code for modifying nvdsanalytics 's ROI at runtime.

1. modify plugin
please refer to gst-nvdsanalytics.diff (3.9 KB). add a new property “reload-cfg” for plugin. when it is set to 1. nvdsanalytics will reload once the configuration file in function gst_nvdsanalytics_transform_ip, meanwhile nvdsanalytics will recreate low level analysis instance NvDsAnalyticCtx. you need to rebuild nvdsanalytics plugin, and replace /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_dsanalytics.so with the new so.
2. modify application
please refer to test5.diff (1.4 KB), the application will set property reload-cfg to 1 after 20 seconds.
3. test
start the test5, then modify the configurations in config_nvdsanalytics.txt.

1 Like

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