Custom NvDsObjectType in Python

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 6.0.1
• TensorRT Version 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only) 510.47.03

Hi,
I am looking to implement my own NvDsObjectType class in Python to be used with the Msg-Conv & Msg-Broker pipeline components.

I have been referencing both the Nvidia Occupancy-Analytics (c++) & Deepstream-test-4 (python) sample applications.
In the python sample app in the ‘generate_event_msg_meta’ function two pre-defined object classes can be created, of types NVDS_OBJECT_TYPE_VEHICLE & NVDS_OBJECT_TYPE_PERSON respectively - and while the following comment is provided to help in implementation of custom objects -
image
There is no further documentation. also when looking into the ‘nvmsgconv.cpp’ file, there are no references to the NVDS_OBJECT_TYPE_PERSON, or NVDS_OBJECT_TYPE_CUSTOM classes.

Thanks for any help on this as it has been difficult to find any substantial documentation on this.

*the full ‘generate_event_msg_data()’ function mentioned, and the ‘generate_person_meta()’ & ‘generate_vehicle_meta()’ functions they mention…

image

The NVDS_OBJECT_TYPE_VEHICLE and NVDS_OBJECT_TYPE_PERSON are defined sources/includes/nvdsmeta_schema.h, it can be found in your deepstream directory. You can consider this is the object type pre-defined in DeepStream. You can define other types if your model supports them.

My Question was how to define other types - if they are found in the ‘nvdsmeta_Schema.h’, is this the only file i will need to change? - will i have to rebuild anything?

If you use C++ version, except this header file, you also need to modify function generate_object_object in sources/libs/nvmsgconv/deepstream_schema/eventmsg_payload.cpp to form json object of the type you added. then rebuild the nvmsgconv plugin.
if you use python, you also need to add bindings for them. we have open sourced deepstream python bindings source code

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

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