How to add detection zones in deepstream app?

Hi. I want to add zones to the frame and I want to count the intersection of detected objects with the zone. How can I do this for dipstream app? I wanted to use the jetson nano version of the detector and tracker for this task
Thanks

Take a look at the nvdsanalytics plugin. It allows you to specify regions of interest (polygons) and get counts of object inside/outside the region.

1 Like

Can I use nvdsanalytics plugin in deepstream python bindings and can I get object movement direction in zone using this plugin?

Hi, check this topic

thanks for link on the topic… It’s unfortunate that this module is not yet implemented in python.
Have you seen an example in C to solve this problem?

@vbogdan1898 There is a piece of sample codes “deepstream-nvdsanalytics-test” which shows nvdsanalytics usage. Please refer to the codes in DeepStream SDK package. The details about gst-nvdsanalytics plugin can also be found in
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.3.14.html#wwpID0E0PE0HA

1 Like

Thanks

Hi.
I have another question about deepstream-nvdsanalyticts-test. How I can setup latency, gpu-id, rtsp-reconnect-interval-sec and another rtsp source settings in this sample? Where in the code should I do this? I assumed it should be in add_decode_bin but it is not so…
Can you help me with this?
Thanks

Please refer to deepstream-app source codes.

latency is for rtspsrc plugin property. https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.html
Several plugins have the “gpu-id” property, you can set as you want.
“rtsp-reconnect-interval-sec” is deepstream-app implemented feature, you can refer to deepstream-app source codes for the implementation.
I can not find “add_decode_bin” in deepstream-nvdsanalyticts-test.
deepstream-nvdsanalyticts-test has already support multiple sources. uridecodebin can also support rtsp source(https://gstreamer.freedesktop.org/documentation/playback/uridecodebin.html), but it is not convenient to set the rtsp properties. deepstream-app is better sample codes.

It is better to know more about gstreamer before read the deepstream sample codes.https://gstreamer.freedesktop.org/