How to bundle up a sequence of images for action recognition system in deepstream

I want to bundle up a sequence of images for action recognition system.
But I couldn’t find method that bundle up the sequence of images.
Because If I try to extract images before ‘nvinfer’, I couldn’t extract images(but I can extract images after ‘nvdsosd’)
How can I bundle up a sequence of images in deepstream before nvinfer?

Hi,

You can use a sink component to save the sequence into images (File Save).

Thanks.

Thank you for quick response.
But I want to not save images(because It is important to keep a high speed), but directly convert a image format that can be used by numpy or cv2.
And How to convert “stream -->image --> modified image–> stream”, Before ‘nvinfer’ I can’t find the way.

Hi,

To use cv2 or numpy, you may want our Deepstream python interface.
You can find some examples on our GitHub.

For example:

Thanks.

But It isn’t work before nvinfer. How can I extract image before nvinfer?

Hi,

You can save the raw image in a similar way.
The frame buffer can be accessed with the following function:

n_frame=pyds.get_nvds_buf_surface(hash(gst_buffer),frame_meta.batch_id)
frame_image=np.array(n_frame,copy=True,order='C')
frame_image=cv2.cvtColor(frame_image,cv2.COLOR_RGBA2BGRA)

For example, the deepstream_imagedata-multistream.py (16.1 KB) is to dump each frame into the same folder.

Thanks.