ml6team / deepstream-python

NVIDIA Deepstream 6.1 Python boilerplate
MIT License
130 stars 36 forks source link

How to implement and integrate custom analytics functions in DeepStream #3

Closed HtutLynn closed 2 years ago

HtutLynn commented 2 years ago

Thanks for the great repo! Hi, I am a beginner in DeepStream and learning on how to convert pytorch-based pipeline to DeepStream based pipeline to improve runtime performance on Jetson devices. I want to implement functions such as line-cross counting similar to this video and also want to stream outputs to websocket server via kafka or directly. I am struggling to integrate these functions to DeepStream app and kinda lost on where to start right now. Can you please guide me on this? Thanks in advance!

julestalloen commented 2 years ago

Hi! Glad you like the repository.

Did you take a look at the Gst-nvdsanalytics plugin already?

This plugin performs analytics on metadata attached by nvinfer (primary detector) and nvtracker. Analytics refer to Region of Interest (ROI) Filtering, Overcrowding Detection, Direction Detection and Line Crossing.

Incorporating this plugin into the base (detection & tracking) pipeline should allow you to gather the required statistics. You can find an example config on the NVIDIA-AI-IOT/deepstream_python_apps repository.

The Kafka connectivity can be achieved with the Gst-nvmsgconv and Gst-nvmsgbroker plugins. An example from NVIDIA can be found here. Again, these could be incorporated into the base pipeline.

I hope that helps!

HtutLynn commented 2 years ago

Hi, @Joxis. Thanks for the detailed references and response! I am still learning and struggling on deepstream-based development so these references would surely help.