Error between pgie and sgie

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU) 1080Ti
• DeepStream Version 5.1
• TensorRT Version 7.2.1
• NVIDIA GPU Driver Version (valid for GPU only) 460
• Issue Type( questions, new requirements, bugs)
Hi, my pipeline is pgie → sgie → … Since my object is already at a fixed position on the frame, in pgie’s custom postprocess I will assign the desired coordinates like the NvDsInferParseCustomBox function written below:

extern "C"
bool NvDsInferParseCustomBox (std::vector<NvDsInferLayerInfo> const &outputLayersInfo,
    NvDsInferNetworkInfo  const &networkInfo,
    NvDsInferParseDetectionParams const &detectionParams,
    std::vector<NvDsInferObjectDetectionInfo> &objectList)
    NvDsInferObjectDetectionInfo result;
    for(int i=0; i < 3; i=i+1){
            result.classId = 0;

            result.left = i*96;
   = 0;
            result.width = 96;
            result.height = 96;

            result.detectionConfidence = 1.0;
    return true;

Then the objects will be transferred to sgie using this coordinate to perform classification. Pipeline works properly if I only have 1 or 2 objects, ie the above code I set i < 2, the result is as shown below:

But the problem occurs when there are more than 3 objects like the code above, the pipeline hangs with perf = 0.0 even though it doesn’t show any errors.

I think the problem is in sgie because when I disable sgie the pipeline works

These are my config files:
config_infer_secondary_plan_engine_obj.txt (1.4 KB)
config_infer_primary_detector_obj.txt (2.8 KB)
source1_primary_test.txt (4.1 KB)

I look forward to getting help from everyone. Thanks very much!

Hi, Looking forward to your help @Fiona.Chen

According to your pgie and sgie config files, you do not set ExtraControl.output_buffer_pool_size in the config files, so the default value is 2. Your sgie can handle at most 2 objects with this buffer pool size limitation. You need to set a larger pool size to handle more objects.

Pipeline freezes when secondary batchsize less than detected objects - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

Thank you for your reply, I have set output_buffer_pool_size: 8 in sgie config but the result is unchanged. I also refer to your link Pipeline freezes when secondary batchsize less than detected objects - #12 by duttaneil16, but the workaround is not clear apparently, i tried setting output_tensor_meta: false and setting output_buffer_pool_size: 2 by default the pipeline works properly even more than 2 objects

If I use a pgie model to detect these logos, then the bounding box is taken from the model (not default as it is) then the pipeline works even with output_buffer_pool_size: 2 and output_tensor_meta: true. That is, only when I fixed the coordinates of the bouding box, the freezes occurred, but if I postprocess for pgie to get the coordinates, everything works, but the coordinates are not really accurate, because I just want to try to see where the problem is.

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