Optimizing Image Saving in a Custom DeepStream Plugin: Seeking Alternatives to Matrix Cloning for Improved Performance

Hello, I’m attempting to create a plugin that will save each frame that the object got detected. I attempted to save frames by modifying the sample plugin code provided by Nvidia gstdsexample_optimized. Using NvBufSurfaceMap, I map the buffer to be accessible by the CPU. This buffer is converted to cv::Mat and cloned so that I may process and save these photos in a separate thread immediately after pushing the buffer to a downstream element. The issue is that this method (matrix cloning) takes a long time and degrades performance. To save time, I tried to create empty matrixes while initializing the plugin and pulling and pushing it to the queue while copying and writing the picture in distinct threads, but it didn’t help much.

I was wondering if there were any other options for dealing with this issue.

ThankYou,
Chaki

NVIDIA RTX2070• Hardware Platform (Jetson / GPU)**
6.1• DeepStream Version**
8.2.5.1• TensorRT Version**

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

Could you try to refer our demo code: sources\apps\sample_apps\deepstream-image-meta-test and save picture with our API? The jpeg encoder is hardware, which will be faster.

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