How to set "bInferDone" when adding detections from a Python probe with "pyservicemaker" in DeepStream 9?

Hi NVIDIA team

I am migrating a DeepStream Python application from “pyds” to “pyservicemaker” in DeepStream 9.

I have a question regarding “NvDsObjectMeta::bInferDone”.

When detections are produced normally by “nvinfer” / “nvinferserver” using a custom C/C++ parser, “bInferDone” is set to “true” automatically, so the generated bounding boxes are correctly handled by “nvtracker”.

However, in my use case I do not want to use a custom parser.

Instead, I run my own post-processing logic in a Python probe and create/add the detections (“NvDsObjectMeta”) manually from the probe.

For “nvtracker” to correctly process these detections, the object metadata needs:

bInferDone = true;

With “pyds”, this was straightforward because we could directly modify the object metadata:

obj_meta.bInferDone = True

With DeepStream 9, NVIDIA recommends using “pyservicemaker” instead of “pyds”, but I could not find an equivalent way to set “bInferDone”.

So my question is:

What is the supported way in “pyservicemaker” to add detections from a Python probe and mark them as inference results (“bInferDone = true”) so that they can be consumed correctly by “nvtracker”?

More specifically:

1. Is “bInferDone” exposed by the “pyservicemaker” metadata API?

2. If it is not exposed, is there another supported way to mark manually-created “ObjectMeta” as inference output?

3. Is there an API to access the underlying “NvDsObjectMeta” from “pyservicemaker”?

4. What is the recommended DeepStream 9 replacement for the following “pyds” workflow?

obj_meta = pyds.nvds_acquire_obj_meta_from_pool(batch_meta)

# Fill bbox, class_id, confidence, etc.

obj_meta.bInferDone = True

pyds.nvds_add_obj_meta_to_frame(frame_meta, obj_meta, None)

To clarify: this is not an issue when using a custom parser, because “nvinfer” / “nvinferserver” sets “bInferDone” automatically. The issue only occurs when detections are generated manually inside a Python probe.

Thanks.

  1. ‘bInferDone’ is framemeta parameter but not objectmeta parameter.
  2. Currently psServiceMaker does not support setting framemeta ‘bInferDone’. We will public service maker source code later, then you can add binding to modify framemeta ‘bInferDone’ by yourself.