Save Frame using GPU buffer data

• Hardware Platform (Jetson / GPU) : GPU
• DeepStream Version : 6.4
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) : 535.171.04

I’m running the deepstream code deepstream_imagedata-multistream_cupy.py, In this we using GPU buffer for fetching image data and modify the red channel to add blue tint to image. Is it possible to save the frame instead of “modify the red channel to add blue tint to image” while using GPU buffer?

You can just comment out this code n_frame_gpu[:, :, 0] = 0.5 * n_frame_gpu[:, :, 0] + 0.5.

How to save the frame in that section of code instead of that line of command?

You can refer to other demo like deepstream_imagedata-multistream.py to save the image with OpenCV.

I refer that code. For using that code we want to convert the GPU data to CPU data, otherwise it will show error while saving the frame.
I want to save the frame from the GPU data with out converting it to CPU data. Is it possible?

If you want to save the frame to a file, you have to copy it to the cpu buffer.

Thanks for the response.
Is it possible to convert the GPU data to RGB format without converting it to CPU data?

It’s already a GPU buffer in the demo deepstream_imagedata-multistream_cupy.py, you can use cupy to process the buffer as your needs. But if you want to save that to a file, you have to copy it to the cpu buffer.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.