How to measure latency in deepstream python app?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson Xavier Nx
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

How to get the measure latency of all modules? I’ve seen I think there are two ways? One is to “access NVDS_LATENCY_MEASUREMENT_META type user meta” and the other is to “use nvds_measure_buffer_latency() API”. But whatever I tried pyds. NvDsFrameLatencyInfo.cast() or pyds.nvds_measure_buffer_latency(), I got AttributeError: module ‘pyds’ has no attribute ‘NvDsFrameLatencyInfo’ and AttributeError: module ‘pyds’ has no attribute ‘nvds_measure_buffer_latency’. Can you give some sample codes?

I can’t find meta data about NVDS_LATENCY_MEASUREMENT_META and nvds_measure_buffer_latency() in So I should write python bindings of latency meta data or nvds_measure_buffer_latency() ?

Our deepstream 6.2 GA is available now. We sugget you update to the latest version. The latest python code has the NVDS_LATENCY_MEASUREMENT_META in bindnvdsmeta.cpp.

There is only a type enum “NVDS_LATENCY_MEASUREMENT_META” of NvDsMetaType in both v1.1.1 and v1.1.6. But there is no the class definition of latency meta like other meta ( such as NvDsObjectMeta in bindnvdsmeta.cpp or NvDsPastFrameObj in bindnvdstrackermeta.cpp). So how should I access latency meta data?

Yes, there is no demo code for this in the source code at present. You can add the binding by refering the link below:
Meta: NvDsMetaCompLatency.

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