Propagating source_id and Storing Secondary Model Output Frames in gie_processing_done_buf_prob

Hardware Platform (Jetson / GPU):
GPU (NVIDIA GeForce RTX 4090)

• DeepStream Version:
7.1

• JetPack Version (valid for Jetson only):
N/A

• TensorRT Version:
10.7.0.23

• NVIDIA GPU Driver Version (valid for GPU only):
565.57.01

Issue Details

I am currently working on a DeepStream application using the deepstream-app.c file. My pipeline consists of:

  1. PGIE: Primary GIE for people detection
  2. SGIE0: Secondary GIE for face detection
  3. SGIE1: Secondary GIE for face recognition

Here’s the challenge I’m facing:

  • In the analytics_done_buf_prob function, I can successfully retrieve the source_id (camera ID). However, at this stage, I only have access to the analytics output and not the complete inference results.
  • In the gie_processing_done_buf_prob function, I have access to the complete inference results (PGIE + SGIEs), but here the source_id is always 0.

I need to propagate the source_id from analytics_done_buf_prob to gie_processing_done_buf_prob so I can use it alongside the complete inference results.

Additionally, I would like to store images for frames corresponding to the secondary model (SGIE) outputs. Currently, I am attempting to do this in the gie_processing_done_buf_prob function but am unsure of the proper way to achieve it.

Requirement Details

  • Module Name: deepstream-app.c
  • Function Description:
    • How can I retain or propagate the source_id from analytics_done_buf_prob to gie_processing_done_buf_prob?
    • What is the best approach to store frames corresponding to the secondary model outputs in the gie_processing_done_buf_prob function?

Steps to Reproduce

  1. Modify the deepstream-app.c file to include custom processing logic in analytics_done_buf_prob and gie_processing_done_buf_prob.
  2. Run the pipeline with the following configuration:
  • PGIE: People detection
  • SGIE0: Face detection
  • SGIE1: Face recognition
  1. Observe the behavior of source_id and attempt to store SGIE output frames.

This gie_processing_done_buf_prob funciton is added at the sink pad of the nvdsosd plugin. The upstream plugin tiler had merged all the frames to one, so there was only one source.

If you want to get the source_id and the complete inference results, you can move the probe function to another plugin by modifing our source code.

About this, you can add a probe function to the sgie and refer to our deepstream-image-meta-test sample to save the image.