How to send detections through Kafka

• Hardware Platform (Jetson / GPU)
Jetson Orin
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version

I need to send cropped detections from my python Deesptream app through Kafka. I read in the documentation that:

To handle custom object types, you must modify the payload generator library
nvmsgconv.cpp. See deepstream-test4 for details about adding custom objects as
NVDS_EVENT_MSG_META user metadata with buffers for generating a custom payload to send
to back end.

from: Gst-nvmsgconv — DeepStream 6.1.1 Release documentation
However, deepstream-test4 only shows the implementation of existing objects NVDS_OBJECT_TYPE_VEHICLE and NVDS_OBJECT_TYPE_PERSON, and the documentation just gives a brief explanation of how to achieve this. Also, I don’t underestand how modify nvmsgconv.cpp to achieve this.

How can I send the detections over Kafka? What are the exact steps to follow?

you only need to modify generate_event_msg_meta related code in osd_sink_pad_buffer_probe of test4\

1 Like

Thanks for the response, I already modified it but if I need to pass the object data usingmeta.extMsg = obj I need to create an object such
obj = pyds.NvDsVehicleObject.cast(data)
How do I create a custom object?

  1. about " need to send cropped detections", do you want to modify the with/height of detection object.
  2. about “I don’t underestand how modify nvmsgconv.cpp to achieve this.”, plugin nvmsgconv will call, both of them are opensoruce, you can add logs to debug, the path is: opt\nvidia\deepstream\deepstream-6.1.1\sources\libs\nvmsgconv\nvmsgconv.cpp
  3. about “How can I send the detections over Kafka? What are the exact steps to follow?” you can run deepstream-test4 to see how the meta is send to kafka server, especially, please refer to the plugin introduction and the application readme file.
1 Like

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

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