Frame extraction using deepstream python app

I am using “deepstream_test_2.py” from here, https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/apps/deepstream-test2. I would like to know how, to extract video frame which can then be converted to BGR numpy array to be used in OpenCV and to possibly perform this in the osd_sink_pad_buffer_probe function itself.

Video frame data access is not included in the alpha release of DS Python bindings. It will be available in an upcoming release.

Could you please give me a rough estimate of when to expect this new release.
Thanks

Hi zarayounis, image data access is available in the DeepStream 5.0 release. The Python deepstream-imagedata-multistream sample app demonstrates this. Please see this code sample for retrieving the image as a NumPy array from the Gst-buffer.

Note the following limitations:

  • The buffer must be in RGBA format so a converter may be needed in your pipeline. See the same sample app for adding this.
  • The extracted image is a copy so changes made to it won’t pass downstream.