I have implemented a custom inference engine in Python and am currently using the deepstream SDK to decode a H264 stream. I would like to add my detections into the batch metadata so that I can make use of the nvtracker. How would I go about doing this in Python?
Using deepstream docker 5.0-dp-20.04-devel
• Hardware Platform - GPU
• DeepStream Version - 5
• NVIDIA GPU Driver Version v440.64
I don’t know if you can in Python. Attaching metadata to Nvidia’s metadata requires writing and connecting some functions for transforming and releasing data.
It’s possible this pure Gstreamer interface has python bindings:
I found a useful tutorial here but at least part of it is in C:
At least part of it is in C, but the code is easy to understand, so even if you’re not familiar with C you should be okay.
Thanks for the reply. With regards to the function below, I assume this is only used for adding extra information to a pre-existing object meta?
It looks like there are some examples here of how to assign your own event metadata (as well as others in that repo. You may wish to search for user_meta.
It appears all the same things that you have to deal with in C apply here, including assigning copy and release functions for your user_meta. You may also have lock the batch_meta while you’re using it. You may find it easier just writing it in C or C++, especially if you’re writing a custom element. You could just modify nvinfer.