LPR application LPD has no NvDsObjectMeta Parent

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) RTX3050
• DeepStream Version 6.4
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hi, I am running my deepstream LPR application on python. However, i noticed that my LPD has no parent object from my primary detector.
Pipeline : PGIE → tracker → SGIE1 → SGIE2 → Nvvidconv → Filter → Tiler
Code to get parent object

while l_obj is not None:
                try:
                    # Casting l_obj.data to pyds.NvDsObjectMeta
                    obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
                except StopIteration:
                    break
                if obj_meta.unique_component_id == 1:
                    print("Obj ID: " + str(obj_meta.object_id))
                elif obj_meta.unique_component_id == 2:
                    # print("LPD parent: ")
                    try:
                        print(obj_meta.parent)
                    except StopIteration:
                        print("Error")

May i know what are the key points for me to get the parent object? Currently, the parent object i got is None. Do i need to edit my pipeline or change any parameters in my config files

Please pat attention that the correct “parent” can only be got before nvmultistreamtiler element in the pipeline. You need to get the metadata before nvmultistreamtiler element.

I’ve tried with the modified deepstream_python_apps/apps/deepstream-test2/deepstream_test_2.py at master · NVIDIA-AI-IOT/deepstream_python_apps (github.com). The LPD model is added as another SGIE in the pipeline, and the parent is available for the LPD detected objects.

deepstream_test_2.py (14.0 KB)
lpd_sgie_config.txt (1.0 KB)

If you wan to read the parent object meta, please cast the meta data correctly, E.G.

try:
       parent_obj_meta = pyds.NvDsObjectMeta.cast(obj_meta.parent)
except StopIteration:
       break
print(parent_obj_meta.class_id)

Thanks for the reference. I have changed according to what you mentioned in deepstream-test-2.py and it is working fine.

The exact same changes are implemented into my current LPR pipeline and there are some issues where parent is not found. May i know except for the python code, any specification is needed? Like additional configs in the config files
image

Please pyt attention that the correct “parent” can only be got before nvmultistreamtiler element in the pipeline. You need to get the metadata before nvmultistreamtiler element.

The configuration file is also provided. Please compare to your own. The “gie-unique-id” parameter for every GIE should be different.

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.