How to build a custom object to use on payloads for message broker with Python Bindings

• Hardware Platform (Jetson / GPU) Jetson Xavier NX
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only) 4.5.1
• TensorRT Version7.1.3
• Issue Type( questions, new requirements, bugs) questions

Hi. I’m building an app with deepstream python bindings using the model for face mask detection (GitHub - NVIDIA-AI-IOT/face-mask-detection: Face Mask Detection using NVIDIA Transfer Learning Toolkit (TLT) and DeepStream for COVID-19). When it is detected a face with no mask I want to send a message with message broker (kafka) with a custom payload. I’m following the example shown in deepstream_test_4 (deepstream_python_apps/ at v1.0 · NVIDIA-AI-IOT/deepstream_python_apps · GitHub) but I want to customize the payload. Instead of using the available objects (ex. pyds.NvDsPersonObject), I want to create a custom payload object to use in field extMsg of pyds.NvDsEventMsgMeta.

In documentation I noticed a NvDsPayloadObject NvDsPayloadObject — Deepstream Deepstream Version: 5.1 documentation but no information is given on how to use this objects or it’s attributes.

How can I send a custom payload in my python app?

Thank you

Yeah, we will check internally.

Hi, any update on how to use the custom payload (python)? I m generating a custom JSON that consists of some fields I need and I want to send that to KAFKA.

Hi. I ended up using kafka-python and created a producer with that in my app. I didn’t figure out how to use message broker from deepstream with custom payload.

Thanks for your response, I am also using Kafka-python but is that the right approach? It didn’t cause any FPS drop so I think it won’t any issue. What do you think?