Run secondary model based on classification result from other secondary

Please provide complete information as applicable to your setup.

**• Hardware Platform **
• DeepStream Version
**• Issue Type **
questions, new requirements

I am working on a pipeline that involves one primary detector and multiple classification secondary models. I am looking for a way to enhance the speed and performance of the pipeline by running only one of the secondary models based on the result from another secondary model.

Specifically, if one of the secondary models (A) fails to pass the threshold, I would like to disable the other secondary models (B and C ) for inference to reduce processing time. Can you provide guidance on how I can implement this?

Thank you!

Is the A model classifier or detector? What does “fails to pass the threshold” mean?

  • A is classifier , and all the secondary models operate on one primary detector.
  • “fails to pass the threshold” meaning, is for example if A classifier classify the car into two classes (bad or good ), then we should run the inference for B and C only if the class result for A is good.

All SGIEs(secondary models) work according to the bboxes from the PGIE(primary detector). One possible way may be that you remove the corresponding bboxes(which are judged by SGIE A as “bad”) in the SGIE A’s src pad probe function, ten the SGIE B and SGIE C will not see the “bad” objects, no inferecing will happen on the unknown objects.

What is the best way to remove the bboxes?

bbox is in NvDsObjectMeta: MetaData in the DeepStream SDK — DeepStream 6.2 Release documentation

Every object has its own bbox. The structure is NVIDIA DeepStream SDK API Reference: _NvDsObjectMeta Struct Reference | NVIDIA Docs

There is API to remove object meta from the frame meta: NVIDIA DeepStream SDK API Reference: Metadata Structures | NVIDIA Docs.

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