Integrate custom code for each detection to the pipeline

Im creating a surveillance system with Deepstream 5.0. And i need to integrate custom code to the pipeline.

For each detection i have to do some validations, if the validation is correct, send an alarm via web service.

How can I embed a piece of code that does this into the pipeline for each detection, accessing the inferred information?

Thanks!

Hi, the best way to do this is with a custom GStreamer filter plugin. You could also use a tee element with an appsink instead.

1 Like

The simplest way would be to use a probe function after the nvinfer (and tracker) element.
In the probe you have access to the detections; confidence; bounding boxes etc and can do whatever validations you like and trigger messages to external systems.