Please refer to this, Filtering objects with nvdsanalytics to reduce messages sent to the broker - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums