Send image over msgbroker

Using the deepstream-test4 python app https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/apps/deepstream-test4

I have added few element and code block into the deepstream-test4 python app by referring the deepstream_python_apps/deepstream_imagedata-multistream.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub to extract the frame from it. Now i would like to send the frame (cv2.cvtColor(frame_copy, cv2.COLOR_RGBA2BGRA)) over the msgbroker. But not sure how to implement this!

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)


Device : NVIDIA GeForce RTX 2.x
Deepstream version : 6.x
TensorRT : 8.x
Issue Type : question

I have added frame field into nvdsmeta_schema.h

typedef struct NvDsEventMsgMeta {
 .................
..................
gchar *image;
}

Then the probe function, tried to access the frame https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/apps/deepstream-test4/deepstream_test_4.py#L295

msg_meta.image= img

error:

msg_meta.image = img
AttributeError: ‘pyds.NvDsEventMsgMeta’ object has no attribute ‘image’

Hi @kayccc
I’m still stuck on this issue, till now i didn’t hear any suggestions too.
Is the msgconv not support large object transferring like image numpy array!

Can’t help you with Python as I use C++ DS but generally all you send to the broker is a text message.
Therefore, you need to convert your image to text (base64 encoding) and attach it as user_meta to frame so msgconv would process it.
And yes, you need to implement your own msgconv to be able to control messages’ format.

You can get more information from nvmsgconv plugin description and looking at deepstream-test5, deepstream-user-metadata-test, deepstream-image-meta-test and deepstream-transfer-learning-app.

Hope it helps.

Refer to documentation at: https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmsgconv.html#payload-with-custom-objects and https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmsgconv.html
We are working on add samples for sending image over msgbroker.

Hi @kesong When can we expect this feature in msgbroker ?

The feature is in our roadmap. It will be released in future release. Thanks!

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