Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODE Actions need to include classifier meta labels when printing, logging, filing, and messaging object data. #1195

Closed
rjhowell44 opened this issue Apr 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@rjhowell44
Copy link
Collaborator

Need to traverse the Object's classifier_meta_list to extract any labels that have been created.

For example, the Print action will do as follows:

        if (pObjectMeta->classifier_meta_list)
        {
            std::cout << "  Classifier Data   : ------------------------" << "\n";
            // For each frame in the batched meta data
            for (NvDsClassifierMetaList* pClassifierMetaList = 
                    pObjectMeta->classifier_meta_list; pClassifierMetaList; 
                        pClassifierMetaList = pClassifierMetaList->next)
            {
                NvDsClassifierMeta* pClassifierMeta = 
                    (NvDsClassifierMeta*)(pClassifierMetaList->data);
                if (pClassifierMeta != NULL)
                {
                    std::cout << "    Infer Id        : " 
                        << pClassifierMeta->unique_component_id <<"\n";
                    for (NvDsLabelInfoList* pLabelInfoList = 
                            pClassifierMeta->label_info_list; pLabelInfoList; 
                                pLabelInfoList = pLabelInfoList->next)
                    {
                        NvDsLabelInfo* pLabelInfo = 
                            (NvDsLabelInfo*)(pLabelInfoList->data);
                        if(pLabelInfo != NULL)
                        {
                            std::cout << "      label         : " 
                                << pLabelInfo->result_label <<"\n";
                        }
                    }
                }
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant