Deepstream python The problem of obtaining labels meta in the secondary classification network

**• Hardware Platform (Jetson / GPU) jetson agx
**• DeepStream Version 5.1
**• JetPack Version (valid for Jetson only) 4.5

core part:

l_user = frame_meta.frame_user_meta_list
classfilter = pyds.NvDsClassifierMeta.cast(l_user.data)
print(“labeles”, classfilter.num_labels)

I refer to various APIs on the official website, and I cannot extract the labels of the secondary classification network. I can only get the labels of the primary detector.

I have dealt with this problem, I will attach a piece of code for other developers to use
I just paid the core code here. For details, you can refer to python’s test3 demo or deepstream-nvdsanalytics

        c_user = obj_meta.classifier_meta_list
        while c_user:
            try:
                user_meta = pyds.NvDsClassifierMeta.cast(c_user.data)

                info_user = user_meta.label_info_list
                while info_user:
                    try:
                        datas = pyds.NvDsLabelInfo.cast(info_user.data)
                        print(datas.num_classes, datas.result_label)
                    except StopIteration:
                        break
                    try:
                        info_user = info_user.next
                    except StopIteration:
                        break
            except StopIteration:
                break

            try:
                c_user = c_user.next
            except StopIteration:
                break

Good, thanks for the update!

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