Analytics and OSD example

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson)
• DeepStream Version 5.1
• JetPack Version 4.5
• TensorRT Version 7

I am looking for an example/docs/topic for how to modify the lines/rectangles that get added to the OSD by NvDsAnalytics, like an ROI or line crossing?

Preferably a python example

lets say we want it to change colour when someone is in that ROI

Regards Andrew

I think 1st you need to check if the person in the ROI, and 2nd you need to modify the corresponding osd params related to the person if yes.

okay that’s not a problem im looking for how/where we iterate to get the osd rectangles that relate to the rectangles and lines that we set for the analytics elements.

like in the tiler sink pad probe? theres examples for iterating over detected objects, if its a person we can easily set its rectangle colour etc.

Sorry if its a trivial question

Yeah, you can do it via a probe.
There are many samples you can refer deepstream-test apps → probe function for how to iterating over detected objects, and you can refer deepstream_nvdsanalytics_test.cpp → probe for analytics meta and refer gstnvinfer_meta_utils.cpp ->attach_metadata_detector for display meta etc.