Send metadata of only objects in ROI to Kafka

I have seen some examples of how to only send messages of objects in ROI field to the message broker, which in my case is Kafka. If I understand this correctly, you need to set the fields msg-conv-comp-id, msg-broker-comp-id, and the NvDSAnalytics unique-id to the same value other than 0 (I am using 17).

Additionally, you need to customize code in NVDS_EVENT_MSG_META. This is the part where I am getting lost. I’m not sure what that code should be, or how to implement it into my graph-composer app.

DS 6.1.1 | GPU | Nvidia Driver 515.65.01 | CUDA 11.7 | TensorRT

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Do you mean you need to customize your own objects msg( especially the payload) instead of use Nvidia provided msgs? If so, the gst-nvmsgconv is totally open source, you can find the code in /opt/nvidia/deepstream/deepstream/sources/
You may need to customize your own payload by low level library APIs. Please refer to /opt/nvidia/deepstream/deepstream/sources/libs/nvmsgconv as the example.

The msgbroker and msgconv extensions are NvDsCloudMsgExt — DeepStream 6.1.1 Release documentation

What I am trying to figure out, is how to ONLY send messages to the msgbroker (Kafka in my case) for objects that exist in the ROI.

I’ve seen a few related examples, but they are I think written in C++ code, and I am unsure of: 1. The code that I need to use to, and
2. How to implement this while using Graph Composer

  1. The functional parts are in c++ code. The c++ gst-nvinfer supports top and bottom ROIs with “roi-top-offset” and “roi-bottom-offset” parameters. Gst-nvinfer — DeepStream 6.1.1 Release documentation
  2. The Graph Composer extension nvidia::deepstream::NvDsInferVideo does not support any ROI settings.NvDsInferenceExt — DeepStream 6.1.1 Release documentation
    You need to implement your own extensions to support such function. There is no complete sample for it now.

I used the NvDsAnalytics extension to create a polygon ROI. That polygon ROI is the only thing I want to receive metadata on. Will what you recommended achieve what I have described?

Fiona, is this method applicable to polygon ROI’s drawn using the NvDsAnalytics extension? From what I am reading, roi-top-offset & roi-bottom-offset appear to be unrelated to the polygon ROI drawn with NvDsAnalytics.

nvdsanalytics does not support polygon ROIs now. We will discuss this requirement.

Can you expand upon your response a bit further? I’m already using polygon ROIs with nvdsanlytics, and the polygon is shown as drawn when the app runs.

Can you expand upon your response a bit further? I’m already using polygon ROIs with nvdsanlytics, and the polygon is shown as drawn when the app runs.

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

@user37663 It is my mistake. nvdsanalytics can work with polygon ROIs. So you only need to customize the message and send it through nvmsgbroker.

Since you want to customize the message and there is no such extension in Graph Composer. You need to develop the message generation probe extension by yourself to replace NvDsSampleProbeMessageMetaCreation extension. Please refer to Developing Extensions for DeepStream — DeepStream 6.1.1 Release documentation for how to develop extension.

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