Accessing object label ID number


I would like to access the number used in object labels that are shown on the deepstream overlay, as shown below:


Is there a field where I can easily access it? I’ve tried NvDsObjectMeta::unique_component_id, but that doesn’t appear to be correct.

“person 207” is part of the picture, or overlayed onto original picture?

It’s overlayed onto the original picture after running through our Deepstream app.

It’s the tracking id.

guint64 object_id

Holds a unique ID for tracking the object.

Thanks for the suggestion; however, the object_id field doesn’t align with the number shown on the overlay. For example, when “Person 207” is on the screen, it has an object_id of 14615544919675109575.

Please refer to the DeepStream documentation:

NvDCF can generate a unique ID to some extent. If enabled by setting useUniqueID: 1 , NvDCF would generate a 32-bit random number at the initialization stage and use it as the upper 32-bit of the following target ID generation, which is uint64_t type. The randomly generated upper 32-bit number allows the target ID to increment from a random position in the possible ID space. The initial value of the lower 32-bit of the target ID starts from 0. If disabled (which is the default value), the target ID generation would be incremented from 0.

So, if you take only the lower 32-bit of the ID, then you can get simple ID. Or, you can set useUniqueID: 0 to disable unique ID feature, generating IDs from 0.