Can someone help me, as to how add custom data in header and source file and give a build so that we can access these new metadata variable and update in our post processing logic.
Also need support for any python code snippet as to how to access and modify those new meta data inside python code.
Example to explain a scenario:
Let’s say we are accessing a live surveillance camera feed for our use cases. I want to use the location information of that surveillance video as a one of metadata and attach it with an alert. This alert is nothing but a frame snippet whenever when any violation is recorded. That alert frame should be saved with a name that includes the surveillance camera information. Since this metadata is unique in my case, it is not present in default metadata available withing deep stream docker. Hence, I want to add these new metadata using the steps provided in above link. But that is not clear.
Any support is highly appreciated.
Thanks for the suggestion. While I try to modify the files, how do i give a build to ensure that changes done are reflected inside the docker. Is there any specific step that I need to follow? Kindly support.
When we recompile using steps according to readme, it gives rise to an error. The log (gst_plugin_compilation_error.txt) is attached for your reference.
1.Don’t use the docker image of 6.4-samples-multiarch. It’s just for deploy binary and and does not contain the CUDA header file. deepstream:6.4-triton-multiarch is for development
Hi, thanks we are able to build using above methods and able to access the custom metadata in python as provided above example(timestamp). But Issue 1:
when we added new custom data by modifying the cpp file and corresponding python and build the solution as mentioned above, we are unable to access newly added metadata inside python. Are we missing something to update? Kindly support.
Error logs when running following command: python3 deepstream_test_1.py sample_720p.h264
Attached DsExampleMeta from native ==> cur 1713965726930.172 ms
Attached DsExampleMeta from native 1 ==> Camera Name Gudimalkapur Junction Camera
access dsmeta from python cur 1713965726930.172 ms
Traceback (most recent call last):
File "/opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/apps/deepstream-test1/deepstream_test_1.py", line 69, in osd_sink_pad_buffer_probe
print(f"access dsmeta from python {pyds.get_string(dsexample_meta.cameraname)}")
AttributeError: 'pyds.DsExampleMeta' object has no attribute 'cameraname'
CPU architecture makes no difference.
Try uninstalling and then reinstalling, this should be a problem caused by python bindings.
I ran your code and they didn’t have any issues
pip uninstall pyds
cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings/build
pip install ./pyds-1.1.10-py3-none-linux_aarch64.whl
Attached DsExampleMeta from native 1 ==> Camera Name Gudimalkapur Junction Camera
access dsmeta from python Camera Name Gudimalkapur Junction Camera
Frame Number=1439 Number of Objects=22 Vehicle_count=19 Person_count=3
Attached DsExampleMeta from native 1 ==> Camera Name Gudimalkapur Junction Camera
access dsmeta from python Camera Name Gudimalkapur Junction Camera
Frame Number=1440 Number of Objects=23 Vehicle_count=20 Person_count=3
Attached DsExampleMeta from native 1 ==> Camera Name Gudimalkapur Junction Camera
access dsmeta from python Camera Name Gudimalkapur Junction Camera
Frame Number=1441 Number of Objects=2 Vehicle_count=2 Person_count=0
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. Thanks